aboutsummaryrefslogtreecommitdiff
path: root/app/source/Cplt/Model/Workflow/Values/Dictionary.cpp
diff options
context:
space:
mode:
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));
}