summaryrefslogtreecommitdiff
path: root/src/std
diff options
context:
space:
mode:
Diffstat (limited to 'src/std')
-rw-r--r--src/std/conversion.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/std/conversion.cpp b/src/std/conversion.cpp
index a2a624d..3d75e8a 100644
--- a/src/std/conversion.cpp
+++ b/src/std/conversion.cpp
@@ -4,7 +4,8 @@ UniquePtr<SmartString> doubleToStr(double num, unsigned int width, unsigned int
{
auto str = make_unique<SmartString>(width + precision);
- dtostrf(num, static_cast<signed char>(width), precision, str->c_str);
+ dtostrf(num, static_cast<signed char>(width), static_cast<unsigned char>(precision),
+ str->c_str);
return str;
}
@@ -15,7 +16,7 @@ UniquePtr<SmartString> intToStr(int num)
auto str = make_unique<SmartString>(width + 1U);
- dtostrf(num, static_cast<signed char>(width + 1U), 0, str->c_str);
+ dtostrf(num, static_cast<signed char>(width + 1U), 0U, str->c_str);
return str;
}
@@ -26,7 +27,7 @@ UniquePtr<SmartString> uintToStr(unsigned int num)
auto str = make_unique<SmartString>(width + 1U);
- dtostrf(num, static_cast<signed char>(width + 1U), 0, str->c_str);
+ dtostrf(num, static_cast<signed char>(width + 1U), 0U, str->c_str);
return str;
}