Skip to content

Commit e3035bc

Browse files
committed
Revert "Fixed some non standard constructs introduced with da1709d"
This reverts commit ec79f29.
1 parent 0726b12 commit e3035bc

11 files changed

+19
-19
lines changed

Client/mods/deathmatch/logic/CClientDisplayManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void CClientDisplayManager::DoPulse ( void )
8787
{
8888
// Render all our displays
8989
m_bCanRemoveFromList = false;
90-
auto iter = m_List.begin ();
90+
auto& iter = m_List.begin ();
9191
while ( iter != m_List.end () )
9292
{
9393
CClientDisplay* pObject = *iter;

Client/mods/deathmatch/logic/CClientModelRequestManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void CClientModelRequestManager::Cancel ( CClientEntity* pEntity, bool bAllowQue
222222
{
223223
// Anything requested by the given class?
224224
SClientModelRequest* pEntry;
225-
for ( auto iter = m_Requests.begin(); iter != m_Requests.end(); )
225+
for ( auto& iter = m_Requests.begin(); iter != m_Requests.end(); )
226226
{
227227
pEntry = *iter;
228228

@@ -259,7 +259,7 @@ void CClientModelRequestManager::DoPulse ( void )
259259

260260
// Call the callback for those finished loading and remove them from the list
261261
SClientModelRequest* pEntry;
262-
for ( auto iter = m_Requests.begin (); iter != m_Requests.end (); )
262+
for ( auto& iter = m_Requests.begin (); iter != m_Requests.end (); )
263263
{
264264
pEntry = *iter;
265265

@@ -323,7 +323,7 @@ void CClientModelRequestManager::DoPulse ( void )
323323
bool CClientModelRequestManager::GetRequestEntry ( CClientEntity* pRequester, std::list < SClientModelRequest* > ::iterator& iterOut )
324324
{
325325
// Look through the list
326-
for ( auto iter = m_Requests.begin() ; iter != m_Requests.end (); iter++ )
326+
for ( auto& iter = m_Requests.begin() ; iter != m_Requests.end (); iter++ )
327327
{
328328
// Same requester as we check for? He has requested something.
329329
if ( (*iter)->pEntity == pRequester )

Client/mods/deathmatch/logic/CClientSoundManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ void CClientSoundManager::ProcessStopQueues( bool bFlush )
409409
}
410410
}
411411

412-
for( auto iter = m_AudioStopQueue.begin() ; iter != m_AudioStopQueue.end() ;)
412+
for( auto& iter = m_AudioStopQueue.begin() ; iter != m_AudioStopQueue.end() ;)
413413
{
414414
if ( iter->second.Get() > 100 || bFlush )
415415
{

Client/mods/deathmatch/logic/CClientTask.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ bool CClientTask::WriteParameters ( lua_State* luaVM, int iTableIndex )
306306
}
307307

308308
// Push the values to it.
309-
auto iterKey = m_Keys.begin ();
310-
auto iterValue = m_Values.begin ();
309+
auto& iterKey = m_Keys.begin ();
310+
auto& iterValue = m_Values.begin ();
311311
while ( iterKey != m_Keys.end () )
312312
{
313313
// Add the entries to it

Client/mods/deathmatch/logic/CClientVehicle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2295,7 +2295,7 @@ void CClientVehicle::StreamedInPulse ( void )
22952295
// Handle door ratio auto reallowment
22962296
if ( !m_AutoReallowDoorRatioMap.empty() )
22972297
{
2298-
for ( auto iter = m_AutoReallowDoorRatioMap.begin() ; iter != m_AutoReallowDoorRatioMap.end() ; )
2298+
for ( auto& iter = m_AutoReallowDoorRatioMap.begin() ; iter != m_AutoReallowDoorRatioMap.end() ; )
22992299
{
23002300
if ( ( CTickCount::Now() - iter->second ).ToInt() > 4000 )
23012301
{

Client/mods/deathmatch/logic/CLocalServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ bool CLocalServer::Save ( void )
349349
// Remove old resources from the config
350350
CXMLNode* pRoot = m_pConfig->GetRootNode();
351351
auto& list = pRoot->GetChildren();
352-
for ( auto iter = list.begin(); iter != list.end(); ++iter )
352+
for ( auto& iter = list.begin(); iter != list.end(); ++iter )
353353
{
354354
CXMLNode* pNode = reinterpret_cast < CXMLNode* > ( *iter );
355355
if ( pNode->GetTagName().compare ( "resource" ) == 0 )

Client/mods/deathmatch/logic/CMovingObjectsManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void CMovingObjectsManager::DoPulse ( void )
1919
// Pulse all the objects we're moving
2020
bool bRemoved = false;
2121
CDeathmatchObject* pObject;
22-
auto iter = m_List.begin ();
22+
auto& iter = m_List.begin ();
2323
while ( iter != m_List.end () )
2424
{
2525
pObject = *iter;

Client/mods/deathmatch/logic/CRegisteredCommands.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bool CRegisteredCommands::RemoveCommand ( CLuaMain* pLuaMain, const char* szKey
6161

6262
int iCompareResult;
6363

64-
auto iter = m_Commands.begin();
64+
auto& iter = m_Commands.begin();
6565
while ( iter != m_Commands.end () )
6666
{
6767
if ( (*iter)->bCaseSensitive )
@@ -111,7 +111,7 @@ void CRegisteredCommands::CleanUpForVM ( CLuaMain* pLuaMain )
111111
assert ( pLuaMain );
112112

113113
// Delete every command that matches
114-
for ( auto iter = m_Commands.begin() ; iter != m_Commands.end (); )
114+
for ( auto& iter = m_Commands.begin() ; iter != m_Commands.end (); )
115115
{
116116
// Matching VM's?
117117
if ( (*iter)->pLuaMain == pLuaMain )

Client/mods/deathmatch/logic/CScriptKeyBinds.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void CScriptKeyBinds::Add ( CScriptKeyBind* pKeyBind )
9999

100100
void CScriptKeyBinds::Clear ( eScriptKeyBindType bindType )
101101
{
102-
auto iter = m_List.begin ();
102+
auto& iter = m_List.begin ();
103103
while ( iter != m_List.end () )
104104
{
105105
auto& pKeyBind = *iter;
@@ -279,7 +279,7 @@ bool CScriptKeyBinds::RemoveKeyFunction ( const SScriptBindableKey* pKey, CLuaMa
279279
bool bFound = false;
280280
CScriptKeyFunctionBind* pBind = NULL;
281281
auto cloneList = m_List;
282-
auto iter = cloneList.begin ();
282+
auto& iter = cloneList.begin ();
283283
while ( iter != cloneList.end () )
284284
{
285285
if ( !(*iter)->IsBeingDeleted () && (*iter)->GetType () == SCRIPT_KEY_BIND_FUNCTION )
@@ -357,7 +357,7 @@ void CScriptKeyBinds::RemoveAllKeys ( CLuaMain* pLuaMain )
357357
{
358358
CScriptKeyBind * pBind = NULL;
359359
auto cloneList = m_List;
360-
auto iter = cloneList.begin ();
360+
auto& iter = cloneList.begin ();
361361
while ( iter != cloneList.end () )
362362
{
363363
pBind = *iter;
@@ -437,7 +437,7 @@ bool CScriptKeyBinds::RemoveControlFunction ( const SScriptBindableGTAControl* p
437437
bool bFound = false;
438438
CScriptControlFunctionBind* pBind = NULL;
439439
auto cloneList = m_List;
440-
auto iter = cloneList.begin ();
440+
auto& iter = cloneList.begin ();
441441
while ( iter != cloneList.end () )
442442
{
443443
if ( !(*iter)->IsBeingDeleted () && (*iter)->GetType () == SCRIPT_KEY_BIND_CONTROL_FUNCTION )

Shared/mods/deathmatch/logic/CDebugHookManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ bool CDebugHookManager::RemoveDebugHook( EDebugHookType hookType, const CLuaFunc
110110
CLuaMain* pLuaMain = g_pGame->GetLuaManager ()->GetVirtualMachine ( functionRef.GetLuaVM() );
111111

112112
std::vector < SDebugHookCallInfo >& hookInfoList = GetHookInfoListForType( hookType );
113-
for( auto iter = hookInfoList.begin() ; iter != hookInfoList.end() ; ++iter )
113+
for( auto& iter = hookInfoList.begin() ; iter != hookInfoList.end() ; ++iter )
114114
{
115115
if ( (*iter).pLuaMain == pLuaMain && (*iter).functionRef == functionRef )
116116
{

0 commit comments

Comments
 (0)