aboutsummaryrefslogtreecommitdiff
path: root/app/source/Cplt/Model/Workflow/Values/Dictionary.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-11-27 12:04:31 -0800
committerrtk0c <[email protected]>2022-11-27 12:04:31 -0800
commit182c8f8357739f905bbd721006480502435b6b43 (patch)
tree082613a474d863182e2ad8f2167f1643f26e67a3 /app/source/Cplt/Model/Workflow/Values/Dictionary.cpp
parentb01ed99a1cd0c863c8709930658513c04dd70f61 (diff)
Update brace style to match rest of my projectscplt-imgui
Diffstat (limited to 'app/source/Cplt/Model/Workflow/Values/Dictionary.cpp')
-rw-r--r--app/source/Cplt/Model/Workflow/Values/Dictionary.cpp21
1 files changed, 7 insertions, 14 deletions
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 <Cplt/Utils/Macros.hpp>
-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<BaseValue>& value)
-{
+BaseValue* DictionaryValue::Insert(std::string_view key, std::unique_ptr<BaseValue>& 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<BaseVal
}
}
-BaseValue& DictionaryValue::InsertOrReplace(std::string_view key, std::unique_ptr<BaseValue> value)
-{
+BaseValue& DictionaryValue::InsertOrReplace(std::string_view key, std::unique_ptr<BaseValue> 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));
}