X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FEvents%2FEvents_Loop.cpp;h=15cb2a65e034157ff0cd5fe207efbf052f03b1f2;hb=21058755486d6cf108eb1c3e2c09771bec3fa3a5;hp=2723057a964a43bd7ba065c24fada25add300ecc;hpb=6e421e939851e0de46554ae45a3ca0e1f67cd91d;p=modules%2Fshaper.git diff --git a/src/Events/Events_Loop.cpp b/src/Events/Events_Loop.cpp index 2723057a9..15cb2a65e 100644 --- a/src/Events/Events_Loop.cpp +++ b/src/Events/Events_Loop.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 CEA/DEN, EDF R&D // // 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(); aFindSender = aFindID->second.find(theSender); } - // check that listener was not registered wit hsuch parameters before + // check that listener was not registered with such parameters before std::list& aListeners = aFindSender->second; for (std::list::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 > >::iterator aFindID =