@@ -107,7 +107,7 @@ bool CMapEventManager::Delete(CLuaMain* pLuaMain)
107
107
108
108
void CMapEventManager::DeleteAll (void )
109
109
{
110
- Delete ([& ](const std::unique_ptr<CMapEvent>&) { return true ; });
110
+ Delete ([](const std::unique_ptr<CMapEvent>&) { return true ; });
111
111
}
112
112
113
113
#ifdef MTA_CLIENT
@@ -348,28 +348,29 @@ void CMapEventManager::TakeOutTheTrash()
348
348
// Clear the trashcan
349
349
m_TrashCan.clear ();
350
350
}
351
-
351
+ template < typename T> struct foo {};
352
352
bool CMapEventManager::HandleExists (CLuaMain* pLuaMain, const std::string& strName, const CLuaFunctionRef& iLuaFunction)
353
353
{
354
354
// Return true if we find an event which matches the handle
355
355
EventsIterPair itPair = m_EventsMap.equal_range (strName);
356
356
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 ;
373
374
}
374
375
375
376
void CMapEventManager::GetHandles (CLuaMain* pLuaMain, const std::string& strName, lua_State* luaVM)
0 commit comments