Skip to content

Commit be990f7

Browse files
authored
DPL Analysis: fix for retrieving placeholder nodes in filters parsed from strings (#14603)
1 parent 89bef8a commit be990f7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Framework/Core/include/Framework/Expressions.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,18 @@ struct PlaceholderNode : LiteralNode {
168168
template <typename T>
169169
PlaceholderNode(T defaultValue, std::string&& path)
170170
: LiteralNode{defaultValue},
171-
name{path}
171+
stored_name{path},
172+
name{stored_name}
172173
{
173174
retrieve = [](InitContext& context, char const* name) { return LiteralNode::var_t{context.options().get<T>(name)}; };
174175
}
175176

176177
void reset(InitContext& context)
177178
{
178-
value = retrieve(context, name.data());
179+
value = retrieve(context, stored_name.empty() ? name.data() : stored_name.data());
179180
}
180181

182+
std::string stored_name;
181183
std::string const& name;
182184
LiteralNode::var_t (*retrieve)(InitContext&, char const*);
183185
};

0 commit comments

Comments
 (0)