From a119e6ca70ffab14f0a70908fa3eeb83b41bb5ab Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 14 Mar 2022 10:24:36 +0100 Subject: refactor: rename std to common --- src/std/conversion.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/std/conversion.cpp (limited to 'src/std/conversion.cpp') diff --git a/src/std/conversion.cpp b/src/std/conversion.cpp deleted file mode 100644 index 3d75e8a..0000000 --- a/src/std/conversion.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "conversion.hpp" - -UniquePtr doubleToStr(double num, unsigned int width, unsigned int precision) -{ - auto str = make_unique(width + precision); - - dtostrf(num, static_cast(width), static_cast(precision), - str->c_str); - - return str; -} - -UniquePtr intToStr(int num) -{ - auto width = static_cast(log10(num)); - - auto str = make_unique(width + 1U); - - dtostrf(num, static_cast(width + 1U), 0U, str->c_str); - - return str; -} - -UniquePtr uintToStr(unsigned int num) -{ - auto width = static_cast(log10(num)); - - auto str = make_unique(width + 1U); - - dtostrf(num, static_cast(width + 1U), 0U, str->c_str); - - return str; -} -- cgit v1.2.3-18-g5258