diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-12-26 00:22:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-12-26 00:27:12 +0100 |
| commit | c87429313b25d102201a013e22e01dae8ba78b5b (patch) | |
| tree | f8265c937f8297712f7ab3680f2b0ede81c94ddf /src/wx/timer_display.cc | |
| parent | 8caf013a9b8d709ed7c3d5e9febee0067e6fcf1f (diff) | |
Use fmt::format() instead of locale_convert<string>
In some places I just used to_string() as there seems no point in
localising things like small ints.
Diffstat (limited to 'src/wx/timer_display.cc')
| -rw-r--r-- | src/wx/timer_display.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/wx/timer_display.cc b/src/wx/timer_display.cc index 4dd9adf42..95469c273 100644 --- a/src/wx/timer_display.cc +++ b/src/wx/timer_display.cc @@ -23,6 +23,7 @@ #include "wx_util.h" #include "lib/timer.h" #include <dcp/locale_convert.h> +#include <fmt/format.h> #include <list> @@ -47,15 +48,15 @@ TimerDisplay::TimerDisplay (wxWindow* parent, StateTimer const & timer, int gets }); add(char_to_wx("get() calls"), true); - add (std_to_wx(dcp::locale_convert<string>(gets)), false); + add(std_to_wx(fmt::format("{:L}", gets)), false); add_spacer (); add_spacer (); for (auto const& i: sorted) { add (std_to_wx(i.first), true); - add (std_to_wx(dcp::locale_convert<string>(i.second.total_time)), false); - add (std_to_wx(dcp::locale_convert<string>(i.second.number)), false); - add (std_to_wx(dcp::locale_convert<string>(i.second.total_time / i.second.number)), false); + add(std_to_wx(fmt::format("{:L}", (i.second.total_time))), false); + add(std_to_wx(fmt::format("{:L}", (i.second.number))), false); + add(std_to_wx(fmt::format("{:L}", (i.second.total_time / i.second.number))), false); } layout (); |
