We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89bef8a commit 3513d04Copy full SHA for 3513d04
1 file changed
Framework/Core/include/Framework/Expressions.h
@@ -168,16 +168,18 @@ struct PlaceholderNode : LiteralNode {
168
template <typename T>
169
PlaceholderNode(T defaultValue, std::string&& path)
170
: LiteralNode{defaultValue},
171
- name{path}
+ stored_name{path},
172
+ name{stored_name}
173
{
174
retrieve = [](InitContext& context, char const* name) { return LiteralNode::var_t{context.options().get<T>(name)}; };
175
}
176
177
void reset(InitContext& context)
178
- value = retrieve(context, name.data());
179
+ value = retrieve(context, stored_name.empty() ? name.data() : stored_name.data());
180
181
182
+ std::string stored_name;
183
std::string const& name;
184
LiteralNode::var_t (*retrieve)(InitContext&, char const*);
185
};
0 commit comments