Skip to content

Commit

Permalink
fix warning in older compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Oct 16, 2023
1 parent bf259eb commit d7457d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/behaviortree_cpp/utils/safe_any.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ nonstd::expected<T, std::string> Any::stringToNumber() const
{
static_assert(std::is_arithmetic_v<T> && !std::is_same_v<T, bool>, "Expecting a numeric type");

auto str = linb::any_cast<SafeAny::SimpleString>(_any);
T out;
const auto str = linb::any_cast<SafeAny::SimpleString>(_any);
#if __has_include(<GL/gl.h>)
T out;
auto [ptr, err] = std::from_chars(str.data(), str.data() + str.size(), out);
if(err == std::errc())
{
Expand Down

0 comments on commit d7457d2

Please sign in to comment.