diff options
author | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-20 18:42:58 -0400 |
---|---|---|
committer | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-20 18:42:58 -0400 |
commit | 381c9c8870fad4c544f29deec22ba4be3549a731 (patch) | |
tree | f5f26e2dd380910b0ddd26e3d885d6bf56d40181 /src/win32_memory.cpp | |
parent | 2528dc80bd1b3e6b2c09db23eb51659e30128110 (diff) |
The first of a few "CBX OCDing over code style" commits, focusing on include/* and src/* but not src/core/* or src/modules/*.
Diffstat (limited to 'src/win32_memory.cpp')
-rw-r--r-- | src/win32_memory.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/win32_memory.cpp b/src/win32_memory.cpp index dc4cd4a89..903be83e6 100644 --- a/src/win32_memory.cpp +++ b/src/win32_memory.cpp @@ -28,9 +28,9 @@ * when it comes to memory usage between dlls and exes. */ -void * ::operator new(size_t iSize) +void *::operator new(size_t iSize) { - void *ptr = HeapAlloc(GetProcessHeap(), 0, iSize); /* zero memory for unix compatibility */ + void *ptr = HeapAlloc(GetProcessHeap(), 0, iSize); /* zero memory for unix compatibility */ /* This is the correct behaviour according to C++ standards for out of memory, * not returning null -- Brain */ @@ -46,7 +46,8 @@ void ::operator delete(void *ptr) HeapFree(GetProcessHeap(), 0, ptr); } -void * operator new[](size_t iSize) { +void *operator new[](size_t iSize) +{ void *ptr = HeapAlloc(GetProcessHeap(), 0, iSize); /* Why were we initializing the memory to zeros here? This is just a waste of cpu! */ if (!ptr) throw std::bad_alloc(); |