@@ -396,7 +396,7 @@ int *CClient::GetInput(int Tick, int IsDummy) const
396396
397397 if (Best != -1 )
398398 return (int *)m_aInputs[d][Best].m_aData ;
399- return 0 ;
399+ return nullptr ;
400400}
401401
402402// ------ state handling -----
@@ -695,8 +695,8 @@ void CClient::DisconnectWithReason(const char *pReason)
695695 mem_zero (&m_CurrentServerInfo, sizeof (m_CurrentServerInfo));
696696
697697 // clear snapshots
698- m_aapSnapshots[0 ][SNAP_CURRENT] = 0 ;
699- m_aapSnapshots[0 ][SNAP_PREV] = 0 ;
698+ m_aapSnapshots[0 ][SNAP_CURRENT] = nullptr ;
699+ m_aapSnapshots[0 ][SNAP_PREV] = nullptr ;
700700 m_aReceivedSnapshots[0 ] = 0 ;
701701 m_LastDummy = false ;
702702
@@ -782,8 +782,8 @@ void CClient::DummyDisconnect(const char *pReason)
782782 g_Config.m_ClDummy = 0 ;
783783
784784 m_aRconAuthed[1 ] = 0 ;
785- m_aapSnapshots[1 ][SNAP_CURRENT] = 0 ;
786- m_aapSnapshots[1 ][SNAP_PREV] = 0 ;
785+ m_aapSnapshots[1 ][SNAP_CURRENT] = nullptr ;
786+ m_aapSnapshots[1 ][SNAP_PREV] = nullptr ;
787787 m_aReceivedSnapshots[1 ] = 0 ;
788788 m_DummyConnected = false ;
789789 m_DummyConnecting = false ;
@@ -1018,7 +1018,7 @@ const char *CClient::DummyName()
10181018 {
10191019 return g_Config.m_ClDummyName ;
10201020 }
1021- const char *pBase = 0 ;
1021+ const char *pBase = nullptr ;
10221022 if (g_Config.m_PlayerName [0 ])
10231023 {
10241024 pBase = g_Config.m_PlayerName ;
@@ -1106,7 +1106,7 @@ const char *CClient::LoadMap(const char *pName, const char *pFilename, SHA256_DI
11061106 str_copy (m_aCurrentMap, pName);
11071107 str_copy (m_aCurrentMapPath, pFilename);
11081108
1109- return 0 ;
1109+ return nullptr ;
11101110}
11111111
11121112static void FormatMapDownloadFilename (const char *pName, const SHA256_DIGEST *pSha256, int Crc, bool Temp, char *pBuffer, int BufferSize)
@@ -1162,7 +1162,7 @@ const char *CClient::LoadMapSearch(const char *pMapName, SHA256_DIGEST *pWantedS
11621162 // backward compatibility with old names
11631163 if (pWantedSha256)
11641164 {
1165- FormatMapDownloadFilename (pMapName, 0 , WantedCrc, false , aBuf, sizeof (aBuf));
1165+ FormatMapDownloadFilename (pMapName, nullptr , WantedCrc, false , aBuf, sizeof (aBuf));
11661166 pError = LoadMap (pMapName, aBuf, pWantedSha256, WantedCrc);
11671167 if (!pError)
11681168 return nullptr ;
@@ -1559,7 +1559,7 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
15591559
15601560 if (m_DummyConnected && !m_DummyReconnectOnReload)
15611561 {
1562- DummyDisconnect (0 );
1562+ DummyDisconnect (nullptr );
15631563 }
15641564
15651565 ResetMapDownload (true );
@@ -1657,7 +1657,7 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
16571657 if (m_MapdownloadFileTemp)
16581658 {
16591659 io_close (m_MapdownloadFileTemp);
1660- m_MapdownloadFileTemp = 0 ;
1660+ m_MapdownloadFileTemp = nullptr ;
16611661 }
16621662 FinishMapDownload ();
16631663 }
@@ -2326,7 +2326,7 @@ void CClient::ResetMapDownload(bool ResetActive)
23262326 if (m_MapdownloadFileTemp)
23272327 {
23282328 io_close (m_MapdownloadFileTemp);
2329- m_MapdownloadFileTemp = 0 ;
2329+ m_MapdownloadFileTemp = nullptr ;
23302330 }
23312331
23322332 if (Storage ()->FileExists (m_aMapdownloadFilenameTemp, IStorage::TYPE_SAVE))
@@ -2389,7 +2389,7 @@ void CClient::ResetDDNetInfoTask()
23892389 if (m_pDDNetInfoTask)
23902390 {
23912391 m_pDDNetInfoTask->Abort ();
2392- m_pDDNetInfoTask = NULL ;
2392+ m_pDDNetInfoTask = nullptr ;
23932393 }
23942394}
23952395
@@ -2407,7 +2407,7 @@ TVersion ToVersion(char *pStr)
24072407 return gs_InvalidVersion;
24082408
24092409 aVersion[i] = str_toint (p);
2410- p = strtok (NULL , " ." );
2410+ p = strtok (nullptr , " ." );
24112411 }
24122412
24132413 if (p)
@@ -3273,7 +3273,7 @@ void CClient::Run()
32733273 if (time_get () > m_BenchmarkStopTime)
32743274 {
32753275 io_close (m_BenchmarkFile);
3276- m_BenchmarkFile = 0 ;
3276+ m_BenchmarkFile = nullptr ;
32773277 Quit ();
32783278 }
32793279 }
@@ -3567,7 +3567,7 @@ void CClient::AutoCSV_Cleanup()
35673567void CClient::Con_Screenshot (IConsole::IResult *pResult, void *pUserData)
35683568{
35693569 CClient *pSelf = (CClient *)pUserData;
3570- pSelf->Graphics ()->TakeScreenshot (0 );
3570+ pSelf->Graphics ()->TakeScreenshot (nullptr );
35713571}
35723572
35733573#if defined(CONF_VIDEORECORDER)
@@ -3928,7 +3928,7 @@ const char *CClient::DemoPlayer_Play(const char *pFilename, int StorageType)
39283928 m_DemoPlayer.Play ();
39293929 GameClient ()->OnEnterGame ();
39303930
3931- return 0 ;
3931+ return nullptr ;
39323932}
39333933
39343934#if defined(CONF_VIDEORECORDER)
@@ -4009,7 +4009,7 @@ void CClient::DemoRecorder_Start(const char *pFilename, bool WithTimestamp, int
40094009 m_pMap->Crc (),
40104010 " client" ,
40114011 m_pMap->MapSize (),
4012- 0 ,
4012+ nullptr ,
40134013 m_pMap->File (),
40144014 nullptr ,
40154015 nullptr );
@@ -5013,7 +5013,7 @@ void CClient::RaceRecord_Start(const char *pFilename)
50135013 m_pMap->Crc (),
50145014 " client" ,
50155015 m_pMap->MapSize (),
5016- 0 ,
5016+ nullptr ,
50175017 m_pMap->File (),
50185018 nullptr ,
50195019 nullptr );
0 commit comments