From 4aa1c8fb6570253b076ce40b67a5eb2962d8cbc2 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Mon, 20 Jul 2015 21:53:12 -0700 Subject: [PATCH] String functions now default to length = 0, no padding. --- firmware/common/ui_widget.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/firmware/common/ui_widget.hpp b/firmware/common/ui_widget.hpp index 11ce4e16..7ab54597 100644 --- a/firmware/common/ui_widget.hpp +++ b/firmware/common/ui_widget.hpp @@ -40,9 +40,11 @@ namespace ui { extern void dirty_event(); -std::string to_string_dec_uint(const uint32_t n, const int32_t l, const char fill = 0); -std::string to_string_dec_int(const int32_t n, const int32_t l, const char fill = 0); -std::string to_string_hex(const uint32_t n, const int32_t l); +// TODO: Move these somewhere else! +// TODO: Allow l=0 to not fill/justify? Already using this way in ui_spectrum.hpp... +std::string to_string_dec_uint(const uint32_t n, const int32_t l = 0, const char fill = 0); +std::string to_string_dec_int(const int32_t n, const int32_t l = 0, const char fill = 0); +std::string to_string_hex(const uint32_t n, const int32_t l = 0); struct Context { FocusManager focus_manager;