Skip to content

Commit

Permalink
assign fallback value
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Beach authored and jbeder committed Jan 26, 2024
1 parent c67d701 commit 96f5c88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/yaml-cpp/node/impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct as_if {
if (!node.m_pNode)
return fallback;

T t;
T t = fallback;
if (convert<T>::decode(node, t))
return t;
return fallback;
Expand Down

0 comments on commit 96f5c88

Please sign in to comment.