From 182c8f8357739f905bbd721006480502435b6b43 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sun, 27 Nov 2022 12:04:31 -0800 Subject: Update brace style to match rest of my projects --- .../Cplt/Model/Workflow/Values/Dictionary.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'app/source/Cplt/Model/Workflow/Values/Dictionary.cpp') diff --git a/app/source/Cplt/Model/Workflow/Values/Dictionary.cpp b/app/source/Cplt/Model/Workflow/Values/Dictionary.cpp index 97bf509..718a0c8 100644 --- a/app/source/Cplt/Model/Workflow/Values/Dictionary.cpp +++ b/app/source/Cplt/Model/Workflow/Values/Dictionary.cpp @@ -2,23 +2,19 @@ #include -bool DictionaryValue::IsInstance(const BaseValue* value) -{ +bool DictionaryValue::IsInstance(const BaseValue* value) { return value->GetKind() == KD_Dictionary; } DictionaryValue::DictionaryValue() - : BaseValue(KD_Dictionary) -{ + : BaseValue(KD_Dictionary) { } -int DictionaryValue::GetCount() const -{ +int DictionaryValue::GetCount() const { return mElements.size(); } -BaseValue* DictionaryValue::Find(std::string_view key) -{ +BaseValue* DictionaryValue::Find(std::string_view key) { auto iter = mElements.find(key); if (iter != mElements.end()) { return iter.value().get(); @@ -27,8 +23,7 @@ BaseValue* DictionaryValue::Find(std::string_view key) } } -BaseValue* DictionaryValue::Insert(std::string_view key, std::unique_ptr& value) -{ +BaseValue* DictionaryValue::Insert(std::string_view key, std::unique_ptr& value) { auto [iter, success] = mElements.insert(key, std::move(value)); if (success) { return iter.value().get(); @@ -37,13 +32,11 @@ BaseValue* DictionaryValue::Insert(std::string_view key, std::unique_ptr value) -{ +BaseValue& DictionaryValue::InsertOrReplace(std::string_view key, std::unique_ptr value) { auto [iter, DISCARD] = mElements.emplace(key, std::move(value)); return *iter.value(); } -void DictionaryValue::Remove(std::string_view key) -{ +void DictionaryValue::Remove(std::string_view key) { mElements.erase(mElements.find(key)); } -- cgit v1.2.3-70-g09d2