mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-22 22:16:37 +08:00
Fix compiler warnings (-Wdouble-promotion)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
This commit is contained in:
parent
78f2232012
commit
4b82a5cadd
@ -120,7 +120,7 @@ endif (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
||||
add_compiler_flags(4.6 "-Wcast-align")
|
||||
add_compiler_flags(4.6 "-Wconversion")
|
||||
#add_compiler_flags(4.6 "-Wdouble-promotion")
|
||||
add_compiler_flags(4.6 "-Wdouble-promotion")
|
||||
add_compiler_flags(4.6 "-Winvalid-pch")
|
||||
add_compiler_flags(4.6 "-Wmissing-declarations")
|
||||
add_compiler_flags(4.6 "-Wmissing-format-attribute")
|
||||
|
@ -189,7 +189,7 @@ namespace oatpp { namespace utils { namespace conversion {
|
||||
}
|
||||
|
||||
v_buff_size float32ToCharSequence(v_float32 value, p_char8 data, v_buff_size n, const char* format) {
|
||||
return snprintf(reinterpret_cast<char*>(data), n, format, value);
|
||||
return snprintf(reinterpret_cast<char*>(data), n, format, static_cast<double>(value));
|
||||
}
|
||||
|
||||
v_buff_size float64ToCharSequence(v_float64 value, p_char8 data, v_buff_size n, const char* format) {
|
||||
|
Loading…
Reference in New Issue
Block a user