From b2d0c3536833433bba329c8e666a973e7be7a23d Mon Sep 17 00:00:00 2001 From: Ricardo Antunes Date: Tue, 26 Sep 2023 15:54:37 +0100 Subject: [PATCH] style(core): format code --- .../core/reflection/traits/dictionary.hpp | 12 ++++++------ .../core/reflection/traits/dictionary.cpp | 18 ++++++------------ 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/core/include/cubos/core/reflection/traits/dictionary.hpp b/core/include/cubos/core/reflection/traits/dictionary.hpp index cf6d3c9439..c48bf2739e 100644 --- a/core/include/cubos/core/reflection/traits/dictionary.hpp +++ b/core/include/cubos/core/reflection/traits/dictionary.hpp @@ -207,10 +207,10 @@ namespace cubos::core::reflection Stop mStop; Key mKey; Value mValue; - InsertDefault mInsertDefault; - InsertCopy mInsertCopy; - InsertMove mInsertMove; - Erase mErase; + InsertDefault mInsertDefault{nullptr}; + InsertCopy mInsertCopy{nullptr}; + InsertMove mInsertMove{nullptr}; + Erase mErase{nullptr}; }; class DictionaryTrait::Iterator @@ -254,7 +254,7 @@ namespace cubos::core::reflection /// @param trait Dictionary trait. Iterator(void* inner, void* instance, const DictionaryTrait& trait); - void* mInner; + void* mInner{nullptr}; void* mInstance; const DictionaryTrait& mTrait; }; @@ -300,7 +300,7 @@ namespace cubos::core::reflection /// @param trait Dictionary trait. ConstIterator(void* inner, const void* instance, const DictionaryTrait& trait); - void* mInner; + void* mInner{nullptr}; const void* mInstance; const DictionaryTrait& mTrait; }; diff --git a/core/src/cubos/core/reflection/traits/dictionary.cpp b/core/src/cubos/core/reflection/traits/dictionary.cpp index 72d961bf16..b265b3c484 100644 --- a/core/src/cubos/core/reflection/traits/dictionary.cpp +++ b/core/src/cubos/core/reflection/traits/dictionary.cpp @@ -15,10 +15,6 @@ DictionaryTrait::DictionaryTrait(const Type& keyType, const Type& valueType, Len , mStop(stop) , mKey(key) , mValue(value) - , mInsertDefault(nullptr) - , mInsertCopy(nullptr) - , mInsertMove(nullptr) - , mErase(nullptr) { } @@ -180,8 +176,7 @@ DictionaryTrait::Iterator::Iterator(void* inner, void* instance, const Dictionar } DictionaryTrait::Iterator::Iterator(const Iterator& other) - : mInner(nullptr) - , mInstance(other.mInstance) + : mInstance(other.mInstance) , mTrait(other.mTrait) { if (!other.isNull()) @@ -190,8 +185,8 @@ DictionaryTrait::Iterator::Iterator(const Iterator& other) } } -DictionaryTrait::Iterator::Iterator(Iterator&& other) - noexcept : mInner(other.mInner) +DictionaryTrait::Iterator::Iterator(Iterator&& other) noexcept + : mInner(other.mInner) , mInstance(other.mInstance) , mTrait(other.mTrait) { @@ -245,8 +240,7 @@ DictionaryTrait::ConstIterator::ConstIterator(void* inner, const void* instance, } DictionaryTrait::ConstIterator::ConstIterator(const ConstIterator& other) - : mInner(nullptr) - , mInstance(other.mInstance) + : mInstance(other.mInstance) , mTrait(other.mTrait) { if (!other.isNull()) @@ -255,8 +249,8 @@ DictionaryTrait::ConstIterator::ConstIterator(const ConstIterator& other) } } -DictionaryTrait::ConstIterator::ConstIterator(ConstIterator&& other) - noexcept : mInner(other.mInner) +DictionaryTrait::ConstIterator::ConstIterator(ConstIterator&& other) noexcept + : mInner(other.mInner) , mInstance(other.mInstance) , mTrait(other.mTrait) {