Salome HOME
Updated copyright comment
[modules/shaper.git] / src / Events / Events_Loop.cpp
index 2723057a964a43bd7ba065c24fada25add300ecc..ca8fb331cfb59a58606d39ce50321bdadf2fd050 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -124,7 +124,7 @@ void Events_Loop::registerListener(Events_Listener* theListener, const Events_ID
     aFindID->second[theSender] = std::list<Events_Listener*>();
     aFindSender = aFindID->second.find(theSender);
   }
-  // check that listener was not registered wit hsuch parameters before
+  // check that listener was not registered witsuch parameters before
   std::list<Events_Listener*>& aListeners = aFindSender->second;
   for (std::list<Events_Listener*>::iterator aL = aListeners.begin(); aL != aListeners.end(); aL++)
     if (*aL == theListener)
@@ -156,14 +156,14 @@ void Events_Loop::removeListener(Events_Listener* theListener)
         aLMap.erase(aLIt->first);
         myListeners[anIt->first] = aLMap;
         if (aLMap.empty())
-          break; // avoid incrementation of the iterator if the the container is empty
+          break; // avoid incrementation of the iterator if the container is empty
       }
       aLIt++;
     }
     if (anIt->second.empty()) {
       myListeners.erase(anIt->first);
       if (myListeners.empty())
-        break; // avoid incrementation of the iterator if the the container is empty
+        break; // avoid incrementation of the iterator if the container is empty
     }
     anIt++;
   }
@@ -174,7 +174,7 @@ void Events_Loop::removeListener(Events_Listener* theListener)
     if (anImIt->second == theListener) {
       myImmediateListeners.erase(anImIt->first);
       if (myImmediateListeners.empty())
-        break; // avoid incrementation of the iterator if the the container is empty
+        break; // avoid incrementation of the iterator if the container is empty
     }
     anImIt++;
   }
@@ -200,9 +200,12 @@ void Events_Loop::flush(const Events_ID& theID)
       // TODO: Stabilization fix. Check later.
       if(myFlushed.find(theID.myID) != myFlushed.end()) {
         myFlushed.erase(myFlushed.find(theID.myID));
-      } else {
+      }
+#ifdef _DEBUG
+      else {
         bool aProblem = true;
       }
+#endif
     }
     // send accumulated messages to "groupListeners"
     std::map<char*, std::map<void*, std::list<Events_Listener*> > >::iterator aFindID =