summaryrefslogtreecommitdiff
path: root/src/utils/general.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/general.cpp')
-rw-r--r--src/utils/general.cpp14
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;
+}