summaryrefslogtreecommitdiff
path: root/src/common/memory_util.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2015-09-11 23:04:19 -0400
committerGravatar Lioncash2015-09-11 23:11:01 -0400
commit07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b (patch)
tree7a17a8078e8b65765d369b4cfa2c34120aec11d6 /src/common/memory_util.cpp
parentMerge pull request #1151 from lioncash/return (diff)
downloadyuzu-07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b.tar.gz
yuzu-07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b.tar.xz
yuzu-07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b.zip
general: Replace 0 literals with nullptr where applicable
Diffstat (limited to 'src/common/memory_util.cpp')
-rw-r--r--src/common/memory_util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp
index 5ef784224..b299b0f0f 100644
--- a/src/common/memory_util.cpp
+++ b/src/common/memory_util.cpp
@@ -28,9 +28,9 @@
28void* AllocateExecutableMemory(size_t size, bool low) 28void* AllocateExecutableMemory(size_t size, bool low)
29{ 29{
30#if defined(_WIN32) 30#if defined(_WIN32)
31 void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE); 31 void* ptr = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
32#else 32#else
33 static char *map_hint = 0; 33 static char* map_hint = nullptr;
34#if defined(ARCHITECTURE_X64) && !defined(MAP_32BIT) 34#if defined(ARCHITECTURE_X64) && !defined(MAP_32BIT)
35 // This OS has no flag to enforce allocation below the 4 GB boundary, 35 // This OS has no flag to enforce allocation below the 4 GB boundary,
36 // but if we hint that we want a low address it is very likely we will 36 // but if we hint that we want a low address it is very likely we will
@@ -85,9 +85,9 @@ void* AllocateExecutableMemory(size_t size, bool low)
85void* AllocateMemoryPages(size_t size) 85void* AllocateMemoryPages(size_t size)
86{ 86{
87#ifdef _WIN32 87#ifdef _WIN32
88 void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); 88 void* ptr = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE);
89#else 89#else
90 void* ptr = mmap(0, size, PROT_READ | PROT_WRITE, 90 void* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE,
91 MAP_ANON | MAP_PRIVATE, -1, 0); 91 MAP_ANON | MAP_PRIVATE, -1, 0);
92 92
93 if (ptr == MAP_FAILED) 93 if (ptr == MAP_FAILED)