Skip to content

Commit

Permalink
fix(core): follow clang-tidy suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
RiscadoA and github-actions[bot] authored Sep 26, 2023
1 parent 3ff90d1 commit c909fae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/cubos/core/reflection/traits/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const void* ArrayTrait::get(const void* instance, std::size_t index) const

bool ArrayTrait::insertDefault(void* instance, std::size_t index) const
{
if (mInsertDefault)
if (mInsertDefault != nullptr)
{
mInsertDefault(instance, index);
return true;
Expand All @@ -72,7 +72,7 @@ bool ArrayTrait::insertDefault(void* instance, std::size_t index) const

bool ArrayTrait::insertCopy(void* instance, std::size_t index, const void* value) const
{
if (mInsertCopy)
if (mInsertCopy != nullptr)
{
mInsertCopy(instance, index, value);
return true;
Expand All @@ -83,7 +83,7 @@ bool ArrayTrait::insertCopy(void* instance, std::size_t index, const void* value

bool ArrayTrait::insertMove(void* instance, std::size_t index, void* value) const
{
if (mInsertMove)
if (mInsertMove != nullptr)
{
mInsertMove(instance, index, value);
return true;
Expand All @@ -94,7 +94,7 @@ bool ArrayTrait::insertMove(void* instance, std::size_t index, void* value) cons

bool ArrayTrait::erase(void* instance, std::size_t index) const
{
if (mErase)
if (mErase != nullptr)
{
mErase(instance, index);
return true;
Expand Down

0 comments on commit c909fae

Please sign in to comment.