diff options
Diffstat (limited to 'core/src/Model')
-rw-r--r-- | core/src/Model/Workflow/Nodes/TextNodes.cpp | 12 | ||||
-rw-r--r-- | core/src/Model/Workflow/Nodes/TextNodes.hpp | 4 | ||||
-rw-r--r-- | core/src/Model/Workflow/Values/BasicValues.cpp | 1 |
3 files changed, 9 insertions, 8 deletions
diff --git a/core/src/Model/Workflow/Nodes/TextNodes.cpp b/core/src/Model/Workflow/Nodes/TextNodes.cpp index 6c71309..e67b033 100644 --- a/core/src/Model/Workflow/Nodes/TextNodes.cpp +++ b/core/src/Model/Workflow/Nodes/TextNodes.cpp @@ -92,7 +92,7 @@ void TextFormatterNode::SetElement(int idx, ArgumentType argument) mMinOutputChars -= original.size(); mElements[idx] = Argument{ - .ArgumentType = argument, + .Type = argument, .PinIdx = Impl::FindPinForElement(mElements, idx), }; /* `original` is invalid from this point */ @@ -106,7 +106,7 @@ void TextFormatterNode::SetElement(int idx, ArgumentType argument) // Create element mElements[idx] = Argument{ - .ArgumentType = argument, + .Type = argument, .PinIdx = pinIdx, }; /* `original` is invalid from this point */ @@ -139,7 +139,7 @@ void TextFormatterNode::InsertElement(int idx, ArgumentType argument) mElements.insert( mElements.begin() + idx, Argument{ - .ArgumentType = argument, + .Type = argument, .PinIdx = pinIdx, }); } @@ -158,7 +158,7 @@ void TextFormatterNode::AppendElement(ArgumentType argument) mInputs.back().MatchingType = ArgumentTypeToValueKind(argument); // Creat eelement mElements.push_back(Argument{ - .ArgumentType = argument, + .Type = argument, .PinIdx = pinIdx, }); } @@ -183,7 +183,7 @@ void TextFormatterNode::Evaluate(WorkflowEvaluationContext& ctx) result += str; }; auto HandleArgument = [&](const Argument& arg) { - switch (arg.ArgumentType) { + switch (arg.Type) { case NumericArgument: { if (auto val = dyn_cast<NumericValue>(ctx.GetConnectionValue(mInputs[arg.PinIdx]))) { result += val->GetString(); @@ -228,4 +228,4 @@ void TextFormatterNode::PreRemoveElement(int idx) arg.PinIdx--; }); } -}
\ No newline at end of file +} diff --git a/core/src/Model/Workflow/Nodes/TextNodes.hpp b/core/src/Model/Workflow/Nodes/TextNodes.hpp index 1beb145..c33854c 100644 --- a/core/src/Model/Workflow/Nodes/TextNodes.hpp +++ b/core/src/Model/Workflow/Nodes/TextNodes.hpp @@ -22,7 +22,7 @@ private: struct Argument { - ArgumentType ArgumentType; + ArgumentType Type; int PinIdx; }; using Element = std::variant<std::string, Argument>; @@ -50,4 +50,4 @@ public: private: void PreRemoveElement(int idx); -};
\ No newline at end of file +}; diff --git a/core/src/Model/Workflow/Values/BasicValues.cpp b/core/src/Model/Workflow/Values/BasicValues.cpp index 3f58de8..93ee366 100644 --- a/core/src/Model/Workflow/Values/BasicValues.cpp +++ b/core/src/Model/Workflow/Values/BasicValues.cpp @@ -1,6 +1,7 @@ #include "BasicValues.hpp" #include <charconv> +#include <cmath> #include <limits> bool NumericValue::IsInstance(const BaseValue* value) |