Skip to content

Commit aafed7e

Browse files
committed
Use strtof when a float is expected
This avoids a warning about double-to-float conversion.
1 parent a338d42 commit aafed7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jbmc/unit/java_bytecode/expr2java.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ TEST_CASE(
9595

9696
SECTION("Hex float to string (print a comment)")
9797
{
98-
const float value = std::strtod("0x1p+37f", nullptr);
98+
const float value = std::strtof("0x1p+37f", nullptr);
9999
#ifndef _MSC_VER
100100
REQUIRE(
101101
floating_point_to_java_string(value) == "0x1p+37f /* 1.37439e+11 */");

0 commit comments

Comments
 (0)