forked from qt-creator/qt-creator
Some clang-tidy -use-modernize-nullptr
Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -30,11 +30,11 @@
|
||||
using namespace GLSL;
|
||||
|
||||
MemoryPool::MemoryPool()
|
||||
: _blocks(0),
|
||||
: _blocks(nullptr),
|
||||
_allocatedBlocks(0),
|
||||
_blockCount(-1),
|
||||
_ptr(0),
|
||||
_end(0)
|
||||
_ptr(nullptr),
|
||||
_end(nullptr)
|
||||
{ }
|
||||
|
||||
MemoryPool::~MemoryPool()
|
||||
@@ -52,7 +52,7 @@ MemoryPool::~MemoryPool()
|
||||
void MemoryPool::reset()
|
||||
{
|
||||
_blockCount = -1;
|
||||
_ptr = _end = 0;
|
||||
_ptr = _end = nullptr;
|
||||
}
|
||||
|
||||
void *MemoryPool::allocate_helper(size_t size)
|
||||
@@ -68,7 +68,7 @@ void *MemoryPool::allocate_helper(size_t size)
|
||||
_blocks = (char **) realloc(_blocks, sizeof(char *) * _allocatedBlocks);
|
||||
|
||||
for (int index = _blockCount; index < _allocatedBlocks; ++index)
|
||||
_blocks[index] = 0;
|
||||
_blocks[index] = nullptr;
|
||||
}
|
||||
|
||||
char *&block = _blocks[_blockCount];
|
||||
|
||||
Reference in New Issue
Block a user