]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBoxOutputConnector.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkBlackBoxOutputConnector.cxx
index 7535b352eae06e19751cb6fef8c47d4d096d6f24..d2ee80e74dec872efd777472318e9f46e7dcf3ae 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxOutputConnector.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/05 13:23:46 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/04/09 11:16:57 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -64,15 +64,12 @@ namespace bbtk
     bbtkDebugMessageInc("Kernel",9,"BlackBoxOutputConnector::UnsetConnection("
                     <<c<<")"<<std::endl);
 
-    std::vector<Connection*>::iterator i;
-    for (i=mConnection.begin();i!=mConnection.end();++i) 
-      {
-       if ( *i == c) break;
-      }
-    //= std::find(mConnection,c);
+    c->Check();
+    std::vector<Connection*>::iterator i
+      = find(mConnection.begin(),mConnection.end(),c);
     if (i==mConnection.end())
       {
-       bbtkError("no connexion "<<c);
+       bbtkInternalError("BlackBoxOutputConnector::UnsetConnection("<<c<<") : connection is absent from connections list");
       }
     mConnection.erase(i);