From 48ec42d4a01b9dd3db4316a3de1230e3f3fffe07 Mon Sep 17 00:00:00 2001 From: Rohit Nirmal Date: Sat, 14 Mar 2015 20:20:41 -0500 Subject: [PATCH] Core: Change NULLs to nullptrs. --- Source/Core/Common/JitRegister.cpp | 2 +- Source/Core/Common/StringUtil.cpp | 2 +- Source/Core/Common/TraversalServer.cpp | 2 +- Source/Core/Core/PowerPC/Jit64/Jit.cpp | 6 +++--- Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/Common/JitRegister.cpp b/Source/Core/Common/JitRegister.cpp index c99b27e73b..7b0d24454a 100644 --- a/Source/Core/Common/JitRegister.cpp +++ b/Source/Core/Common/JitRegister.cpp @@ -51,7 +51,7 @@ void Init() s_perf_map_file.Open(filename, "w"); // Disable buffering in order to avoid missing some mappings // if the event of a crash: - std::setvbuf(s_perf_map_file.GetHandle(), NULL, _IONBF, 0); + std::setvbuf(s_perf_map_file.GetHandle(), nullptr, _IONBF, 0); } } diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 7f233e430d..3f201f321f 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -29,7 +29,7 @@ #if !defined(_WIN32) && !defined(ANDROID) static locale_t GetCLocale() { - static locale_t c_locale = newlocale(LC_ALL_MASK, "C", NULL); + static locale_t c_locale = newlocale(LC_ALL_MASK, "C", nullptr); return c_locale; } #endif diff --git a/Source/Core/Common/TraversalServer.cpp b/Source/Core/Common/TraversalServer.cpp index 777078bccb..097d812ddd 100644 --- a/Source/Core/Common/TraversalServer.cpp +++ b/Source/Core/Common/TraversalServer.cpp @@ -431,7 +431,7 @@ int main() // note: switch to recvmmsg (yes, mmsg) if this becomes // expensive rv = recvfrom(sock, &packet, sizeof(packet), 0, (sockaddr*) &raddr, &addrLen); - if (gettimeofday(&tv, NULL) < 0) + if (gettimeofday(&tv, nullptr) < 0) { perror("gettimeofday"); exit(1); diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index f1ee995f74..f01a2cd39d 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -179,7 +179,7 @@ void Jit64::Init() jo.optimizeGatherPipe = true; jo.accurateSinglePrecision = true; js.memcheck = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU; - js.fastmemLoadStore = NULL; + js.fastmemLoadStore = nullptr; js.compilerPC = 0; gpr.SetEmitter(this); @@ -642,7 +642,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc js.instructionsLeft = (code_block.m_num_instructions - 1) - i; const GekkoOPInfo *opinfo = ops[i].opinfo; js.downcountAmount += opinfo->numCycles; - js.fastmemLoadStore = NULL; + js.fastmemLoadStore = nullptr; js.fixupExceptionHandler = false; js.revertGprLoad = -1; js.revertFprLoad = -1; @@ -803,7 +803,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc SwitchToFarCode(); if (!js.fastmemLoadStore) { - exceptionHandlerAtLoc[js.fastmemLoadStore] = NULL; + exceptionHandlerAtLoc[js.fastmemLoadStore] = nullptr; SetJumpTarget(js.fixupExceptionHandler ? js.exceptionHandler : memException); } else diff --git a/Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp b/Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp index 6f2ad2747e..03963dc5dd 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp @@ -76,7 +76,7 @@ bool Jitx86Base::BackPatch(u32 emAddress, SContext* ctx) BitSet32 registersInUse = it->second; - u8* exceptionHandler = NULL; + u8* exceptionHandler = nullptr; if (jit->js.memcheck) { auto it2 = exceptionHandlerAtLoc.find(codePtr);