diff options
| author | Martin Hořeňovský | 2021-10-03 20:23:10 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-10-03 20:23:10 +0200 |
| commit | 48a889859bca45ee2c5e5064199c1e5b4b3e00cb (patch) | |
| tree | 39e9684d66a26c4164d56dd5e78c34e234e54734 | |
| parent | d65ee04b74cc166e98fdb409568bfbc9f40da40f (diff) | |
| download | catch3-48a889859bca45ee2c5e5064199c1e5b4b3e00cb.tar.gz | |
Simplify how ratio symbol is returned when stringifying ratios
| -rw-r--r-- | src/catch2/catch_tostring.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp index b718a18b..2fd613d3 100644 --- a/src/catch2/catch_tostring.hpp +++ b/src/catch2/catch_tostring.hpp @@ -558,27 +558,27 @@ struct ratio_string { template <> struct ratio_string<std::atto> { - static std::string symbol() { return "a"; } + static char symbol() { return 'a'; } }; template <> struct ratio_string<std::femto> { - static std::string symbol() { return "f"; } + static char symbol() { return 'f'; } }; template <> struct ratio_string<std::pico> { - static std::string symbol() { return "p"; } + static char symbol() { return 'p'; } }; template <> struct ratio_string<std::nano> { - static std::string symbol() { return "n"; } + static char symbol() { return 'n'; } }; template <> struct ratio_string<std::micro> { - static std::string symbol() { return "u"; } + static char symbol() { return 'u'; } }; template <> struct ratio_string<std::milli> { - static std::string symbol() { return "m"; } + static char symbol() { return 'm'; } }; //////////// |