Skip to content

Commit d8ca1f1

Browse files
committed
fix: covert_impl checkTruncation
1 parent 345d793 commit d8ca1f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/behaviortree_cpp/utils/convert_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ inline void checkTruncation(const From& from)
101101
}
102102
}
103103
// Handle floating point to integer
104-
if constexpr(std::is_floating_point_v<From> && std::is_integral_v<To>)
104+
else if constexpr(std::is_floating_point_v<From> && std::is_integral_v<To>)
105105
{
106106
if(from > static_cast<From>(std::numeric_limits<To>::max()) ||
107107
from < static_cast<From>(std::numeric_limits<To>::lowest()) ||

0 commit comments

Comments
 (0)