Skip to content

Commit

Permalink
Initialize template variable
Browse files Browse the repository at this point in the history
* Initializes T out for both class and primitive types
  • Loading branch information
sharminramli committed Jun 25, 2024
1 parent b8277b7 commit a7ac7af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/behaviortree_cpp/tree_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class TreeNode
template <typename T>
[[nodiscard]] Expected<T> getInput(const std::string& key) const
{
T out;
T out{};
auto res = getInput(key, out);
return (res) ? Expected<T>(out) : nonstd::make_unexpected(res.error());
}
Expand Down

0 comments on commit a7ac7af

Please sign in to comment.