diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-14 10:11:32 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-02-14 10:11:32 +0100 |
commit | 7892ef9d248c189be68ce7faf63230ec0a318b67 (patch) | |
tree | 7c3d07779d5ce96994f81c0cc22e8b667601ee9d /src/utils/general.cpp | |
parent | a03dfe959fcafd238119bdf7f27c07b92064496e (diff) |
refactor: reorganize & add debugging
Diffstat (limited to 'src/utils/general.cpp')
-rw-r--r-- | src/utils/general.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/utils/general.cpp b/src/utils/general.cpp new file mode 100644 index 0000000..bbcd4dd --- /dev/null +++ b/src/utils/general.cpp @@ -0,0 +1,14 @@ +#include "general.hpp" + +void stop() +{ + while (true) {} +} + +unique_ptr<SmartString> floatToStr(float num, unsigned int width, unsigned int precision) +{ + auto str = make_unique<SmartString>(width + precision); + dtostrf(num, width, precision, str->c_str); + + return str; +} |