@@ -107,7 +107,7 @@ bool CMapEventManager::Delete(CLuaMain* pLuaMain)
107107
108108void CMapEventManager::DeleteAll (void )
109109{
110- Delete ([& ](const std::unique_ptr<CMapEvent>&) { return true ; });
110+ Delete ([](const std::unique_ptr<CMapEvent>&) { return true ; });
111111}
112112
113113#ifdef MTA_CLIENT
@@ -348,28 +348,29 @@ void CMapEventManager::TakeOutTheTrash()
348348 // Clear the trashcan
349349 m_TrashCan.clear ();
350350}
351-
351+ template < typename T> struct foo {};
352352bool CMapEventManager::HandleExists (CLuaMain* pLuaMain, const std::string& strName, const CLuaFunctionRef& iLuaFunction)
353353{
354354 // Return true if we find an event which matches the handle
355355 EventsIterPair itPair = m_EventsMap.equal_range (strName);
356356 return std::find_if (itPair.first , itPair.second ,
357- [&](const auto & pair) {
358- const auto & pMapEvent = pair.second ;
359- // Is it not being destroyed?
360- if (pMapEvent->IsBeingDestroyed ())
361- return false ;
362- // Same lua main?
363- if (pMapEvent->GetVM () != pLuaMain)
364- return false ;
365- // Same name?
366- dassert (pMapEvent->GetName () == strName);
367- // Same lua function?
368- if (pMapEvent->GetLuaFunction () != iLuaFunction)
369- return false ;
370- // It exists
371- return true ;
372- }) != itPair.second ;
357+ [&](const std::pair<const std::string, std::unique_ptr<CMapEvent>>& pair)
358+ {
359+ const auto & pMapEvent = pair.second ;
360+ // Is it not being destroyed?
361+ if (pMapEvent->IsBeingDestroyed ())
362+ return false ;
363+ // Same lua main?
364+ if (pMapEvent->GetVM () != pLuaMain)
365+ return false ;
366+ // Same name?
367+ dassert (pMapEvent->GetName () == strName);
368+ // Same lua function?
369+ if (pMapEvent->GetLuaFunction () != iLuaFunction)
370+ return false ;
371+ // It exists
372+ return true ;
373+ }) != itPair.second ;
373374}
374375
375376void CMapEventManager::GetHandles (CLuaMain* pLuaMain, const std::string& strName, lua_State* luaVM)
0 commit comments