diff options
Diffstat (limited to 'glslang/MachineIndependent/PoolAlloc.cpp')
-rw-r--r-- | glslang/MachineIndependent/PoolAlloc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/glslang/MachineIndependent/PoolAlloc.cpp b/glslang/MachineIndependent/PoolAlloc.cpp index c3a3928c..84c40f4e 100644 --- a/glslang/MachineIndependent/PoolAlloc.cpp +++ b/glslang/MachineIndependent/PoolAlloc.cpp @@ -267,8 +267,8 @@ void* TPoolAllocator::allocate(size_t numBytes) // size_t numBytesToAlloc = allocationSize + headerSkip; tHeader* memory = reinterpret_cast<tHeader*>(::new char[numBytesToAlloc]); - if (memory == nullptr) - return nullptr; + if (memory == 0) + return 0; // Use placement-new to initialize header new(memory) tHeader(inUseList, (numBytesToAlloc + pageSize - 1) / pageSize); @@ -289,8 +289,8 @@ void* TPoolAllocator::allocate(size_t numBytes) freeList = freeList->nextPage; } else { memory = reinterpret_cast<tHeader*>(::new char[pageSize]); - if (memory == nullptr) - return nullptr; + if (memory == 0) + return 0; } // Use placement-new to initialize header @@ -308,7 +308,7 @@ void* TPoolAllocator::allocate(size_t numBytes) // void TAllocation::checkAllocList() const { - for (const TAllocation* alloc = this; alloc != nullptr; alloc = alloc->prevAlloc) + for (const TAllocation* alloc = this; alloc != 0; alloc = alloc->prevAlloc) alloc->check(); } |