1919#include " DbgHelpLoader.h"
2020
2121
22- DbgHelpLoader* DbgHelpLoader::Inst = NULL ;
22+ DbgHelpLoader* DbgHelpLoader::Inst = nullptr ;
2323CriticalSectionClass DbgHelpLoader::CriticalSection;
2424
2525DbgHelpLoader::DbgHelpLoader ()
@@ -48,7 +48,7 @@ bool DbgHelpLoader::isLoaded()
4848{
4949 CriticalSectionClass::LockClass lock (CriticalSection);
5050
51- return Inst != NULL && Inst->m_dllModule != HMODULE (0 );
51+ return Inst != nullptr && Inst->m_dllModule != HMODULE (0 );
5252}
5353
5454bool DbgHelpLoader::isLoadedFromSystem ()
@@ -62,14 +62,14 @@ bool DbgHelpLoader::isFailed()
6262{
6363 CriticalSectionClass::LockClass lock (CriticalSection);
6464
65- return Inst != NULL && Inst->m_failed ;
65+ return Inst != nullptr && Inst->m_failed ;
6666}
6767
6868bool DbgHelpLoader::load ()
6969{
7070 CriticalSectionClass::LockClass lock (CriticalSection);
7171
72- if (Inst == NULL )
72+ if (Inst == nullptr )
7373 {
7474 // Cannot use new/delete here when this is loaded during game memory initialization.
7575 void * p = GlobalAlloc (GMEM_FIXED, sizeof (DbgHelpLoader));
@@ -133,7 +133,7 @@ void DbgHelpLoader::unload()
133133{
134134 CriticalSectionClass::LockClass lock (CriticalSection);
135135
136- if (Inst == NULL )
136+ if (Inst == nullptr )
137137 return ;
138138
139139 if (--Inst->m_referenceCount != 0 )
@@ -143,7 +143,7 @@ void DbgHelpLoader::unload()
143143
144144 Inst->~DbgHelpLoader ();
145145 GlobalFree (Inst);
146- Inst = NULL ;
146+ Inst = nullptr ;
147147}
148148
149149void DbgHelpLoader::freeResources ()
@@ -233,7 +233,7 @@ BOOL DbgHelpLoader::symLoadModule(
233233{
234234 CriticalSectionClass::LockClass lock (CriticalSection);
235235
236- if (Inst != NULL && Inst->m_symLoadModule )
236+ if (Inst != nullptr && Inst->m_symLoadModule )
237237 return Inst->m_symLoadModule (hProcess, hFile, ImageName, ModuleName, BaseOfDll, SizeOfDll);
238238
239239 return FALSE ;
@@ -245,7 +245,7 @@ DWORD DbgHelpLoader::symGetModuleBase(
245245{
246246 CriticalSectionClass::LockClass lock (CriticalSection);
247247
248- if (Inst != NULL && Inst->m_symGetModuleBase )
248+ if (Inst != nullptr && Inst->m_symGetModuleBase )
249249 return Inst->m_symGetModuleBase (hProcess, dwAddr);
250250
251251 return 0u ;
@@ -257,7 +257,7 @@ BOOL DbgHelpLoader::symUnloadModule(
257257{
258258 CriticalSectionClass::LockClass lock (CriticalSection);
259259
260- if (Inst != NULL && Inst->m_symUnloadModule )
260+ if (Inst != nullptr && Inst->m_symUnloadModule )
261261 return Inst->m_symUnloadModule (hProcess, BaseOfDll);
262262
263263 return FALSE ;
@@ -271,7 +271,7 @@ BOOL DbgHelpLoader::symGetSymFromAddr(
271271{
272272 CriticalSectionClass::LockClass lock (CriticalSection);
273273
274- if (Inst != NULL && Inst->m_symGetSymFromAddr )
274+ if (Inst != nullptr && Inst->m_symGetSymFromAddr )
275275 return Inst->m_symGetSymFromAddr (hProcess, Address, Displacement, Symbol);
276276
277277 return FALSE ;
@@ -285,7 +285,7 @@ BOOL DbgHelpLoader::symGetLineFromAddr(
285285{
286286 CriticalSectionClass::LockClass lock (CriticalSection);
287287
288- if (Inst != NULL && Inst->m_symGetLineFromAddr )
288+ if (Inst != nullptr && Inst->m_symGetLineFromAddr )
289289 return Inst->m_symGetLineFromAddr (hProcess, dwAddr, pdwDisplacement, Line);
290290
291291 return FALSE ;
@@ -296,7 +296,7 @@ DWORD DbgHelpLoader::symSetOptions(
296296{
297297 CriticalSectionClass::LockClass lock (CriticalSection);
298298
299- if (Inst != NULL && Inst->m_symSetOptions )
299+ if (Inst != nullptr && Inst->m_symSetOptions )
300300 return Inst->m_symSetOptions (SymOptions);
301301
302302 return 0u ;
@@ -308,7 +308,7 @@ LPVOID DbgHelpLoader::symFunctionTableAccess(
308308{
309309 CriticalSectionClass::LockClass lock (CriticalSection);
310310
311- if (Inst != NULL && Inst->m_symFunctionTableAccess )
311+ if (Inst != nullptr && Inst->m_symFunctionTableAccess )
312312 return Inst->m_symFunctionTableAccess (hProcess, AddrBase);
313313
314314 return NULL ;
@@ -327,7 +327,7 @@ BOOL DbgHelpLoader::stackWalk(
327327{
328328 CriticalSectionClass::LockClass lock (CriticalSection);
329329
330- if (Inst != NULL && Inst->m_stackWalk )
330+ if (Inst != nullptr && Inst->m_stackWalk )
331331 return Inst->m_stackWalk (MachineType, hProcess, hThread, StackFrame, ContextRecord, ReadMemoryRoutine, FunctionTableAccessRoutine, GetModuleBaseRoutine, TranslateAddress);
332332
333333 return FALSE ;
0 commit comments