diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 19:49:09 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 20:08:25 +0300 |
commit | 16732def37c5a66f3ea28dbe247b09cc6bca6677 (patch) | |
tree | 5d14f5c920a1411e336bd80b12becbb3f73de19a /source/blender/compositor/intern/COM_ExecutionGroup.cpp | |
parent | 88926375a0e4e45f72c87b9e487c060ddd3c9216 (diff) |
Cleanup: Clang-Tidy modernize-use-nullptr
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
Diffstat (limited to 'source/blender/compositor/intern/COM_ExecutionGroup.cpp')
-rw-r--r-- | source/blender/compositor/intern/COM_ExecutionGroup.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index ad980177ae5..27cec28f5d5 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -45,8 +45,8 @@ ExecutionGroup::ExecutionGroup() { this->m_isOutput = false; this->m_complex = false; - this->m_chunkExecutionStates = NULL; - this->m_bTree = NULL; + this->m_chunkExecutionStates = nullptr; + this->m_bTree = nullptr; this->m_height = 0; this->m_width = 0; this->m_cachedMaxReadBufferOffset = 0; @@ -121,13 +121,13 @@ NodeOperation *ExecutionGroup::getOutputOperation() const void ExecutionGroup::initExecution() { - if (this->m_chunkExecutionStates != NULL) { + if (this->m_chunkExecutionStates != nullptr) { MEM_freeN(this->m_chunkExecutionStates); } unsigned int index; determineNumberOfChunks(); - this->m_chunkExecutionStates = NULL; + this->m_chunkExecutionStates = nullptr; if (this->m_numberOfChunks != 0) { this->m_chunkExecutionStates = (ChunkExecutionState *)MEM_mallocN( sizeof(ChunkExecutionState) * this->m_numberOfChunks, __func__); @@ -152,15 +152,15 @@ void ExecutionGroup::initExecution() void ExecutionGroup::deinitExecution() { - if (this->m_chunkExecutionStates != NULL) { + if (this->m_chunkExecutionStates != nullptr) { MEM_freeN(this->m_chunkExecutionStates); - this->m_chunkExecutionStates = NULL; + this->m_chunkExecutionStates = nullptr; } this->m_numberOfChunks = 0; this->m_numberOfXChunks = 0; this->m_numberOfYChunks = 0; this->m_cachedReadOperations.clear(); - this->m_bTree = NULL; + this->m_bTree = nullptr; } void ExecutionGroup::determineResolution(unsigned int resolution[2]) { @@ -415,7 +415,7 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo MemoryBuffer *buffer = memoryBuffers[index]; if (buffer) { if (buffer->isTemporarily()) { - memoryBuffers[index] = NULL; + memoryBuffers[index] = nullptr; delete buffer; } } @@ -478,7 +478,7 @@ MemoryBuffer *ExecutionGroup::allocateOutputBuffer(int /*chunkNumber*/, rcti *re MemoryBuffer *buffer = new MemoryBuffer(writeOperation->getMemoryProxy(), rect); return buffer; } - return NULL; + return nullptr; } bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area) @@ -562,7 +562,7 @@ bool ExecutionGroup::scheduleChunkWhenPossible(ExecutionSystem *graph, int xChun determineDependingAreaOfInterest(&rect, readOperation, &area); ExecutionGroup *group = memoryProxy->getExecutor(); - if (group != NULL) { + if (group != nullptr) { if (!group->scheduleAreaWhenPossible(graph, &area)) { canBeExecuted = false; } |