]> AND Private Git Repository - blast.git/blobdiff - FunctionalInterface.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
adding save to gitignore
[blast.git] / FunctionalInterface.cpp
index cc9f7658c7ab083b8fe2bfbb87cea71012e6d2c5..bce7ca1f3d1293d7f66f453a6d22a44cb0966458 100644 (file)
@@ -65,10 +65,10 @@ int FunctionalInterface::getInterfaceMultiplicity() {
     return -1;\r
   }\r
   else if ( reference->getMultiplicity() == -1) {\r
     return -1;\r
   }\r
   else if ( reference->getMultiplicity() == -1) {\r
-    return ifaceCount+1;\r
+    return ifaceCount;\r
   }\r
   }\r
-  else if ( reference->getMultiplicity() > ifaceCount) {\r
-    return ifaceCount+1;\r
+  else if ( ifaceCount < reference->getMultiplicity()) {\r
+    return ifaceCount;\r
   }\r
   return -1;\r
 }\r
   }\r
   return -1;\r
 }\r
@@ -82,7 +82,7 @@ AbstractInterface *FunctionalInterface::clone() {
   inter->setPurpose(purpose);\r
   inter->setLevel(level);  \r
   inter->connectFrom(NULL);\r
   inter->setPurpose(purpose);\r
   inter->setLevel(level);  \r
   inter->connectFrom(NULL);\r
-  inter->setName(reference->getName()+"_"+QString::number(id));\r
+  inter->setName(reference->getName()+"_"+QString::number(id+1));\r
   return inter;\r
 }\r
 \r
   return inter;\r
 }\r
 \r