Skip to content

Commit d01e283

Browse files
committed
Prevent narrowing warning
1 parent 7154276 commit d01e283

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tinyexpr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ namespace te_builtins
938938
{
939939
throw std::runtime_error("Bitwise NOT value must be positive.");
940940
}
941-
if (val > std::numeric_limits<uint64_t>::max())
941+
if (val > static_cast<te_type>(std::numeric_limits<uint64_t>::max()))
942942
{
943943
throw std::runtime_error("Value is too large for bitwise NOT.");
944944
}

0 commit comments

Comments
 (0)