From bcdce9633dc351d3bc7f347a165348b8fab87cd9 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 15 Feb 2022 12:33:52 +0100 Subject: refactor: reorganize files & improve classes --- src/utils/general.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/utils/general.cpp (limited to 'src/utils/general.cpp') diff --git a/src/utils/general.cpp b/src/utils/general.cpp deleted file mode 100644 index 3464c30..0000000 --- a/src/utils/general.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "general.hpp" - -void stop() -{ - while (true) {} -} - -UniquePtr doubleToStr(double num, unsigned int width, unsigned int precision) -{ - auto str = make_unique(width + precision); - - dtostrf(num, static_cast(width), 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), 0, 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), 0, str->c_str); - - return str; -} -- cgit v1.2.3-18-g5258