mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Remove debug code
This commit is contained in:
parent
5fb5513572
commit
105d988624
@ -98,12 +98,9 @@ void CGuiHandler::init()
|
||||
pointerSpeedMultiplier = settings["general"]["relativePointerSpeedMultiplier"].Float();
|
||||
}
|
||||
|
||||
static bool debugDetectDeactivationDuringHandle = false;
|
||||
|
||||
void CGuiHandler::handleElementActivate(CIntObject * elem, ui16 activityFlag)
|
||||
{
|
||||
processLists(activityFlag,[&](std::list<CIntObject*> * lst){
|
||||
assert(debugDetectDeactivationDuringHandle == false);
|
||||
lst->push_front(elem);
|
||||
});
|
||||
elem->active_m |= activityFlag;
|
||||
@ -112,7 +109,6 @@ void CGuiHandler::handleElementActivate(CIntObject * elem, ui16 activityFlag)
|
||||
void CGuiHandler::handleElementDeActivate(CIntObject * elem, ui16 activityFlag)
|
||||
{
|
||||
processLists(activityFlag,[&](std::list<CIntObject*> * lst){
|
||||
assert(debugDetectDeactivationDuringHandle == false);
|
||||
auto hlp = std::find(lst->begin(),lst->end(),elem);
|
||||
assert(hlp != lst->end());
|
||||
lst->erase(hlp);
|
||||
@ -598,7 +594,6 @@ void CGuiHandler::handleMouseMotion(const SDL_Event & current)
|
||||
//sending active, hovered hoverable objects hover() call
|
||||
std::vector<CIntObject*> hlp;
|
||||
|
||||
debugDetectDeactivationDuringHandle = true;
|
||||
auto hoverableCopy = hoverable;
|
||||
for(auto & elem : hoverableCopy)
|
||||
{
|
||||
@ -613,8 +608,6 @@ void CGuiHandler::handleMouseMotion(const SDL_Event & current)
|
||||
(elem)->hovered = false;
|
||||
}
|
||||
}
|
||||
debugDetectDeactivationDuringHandle = false;
|
||||
assert(hoverableCopy == hoverable);
|
||||
|
||||
for(auto & elem : hlp)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user