Simplify how ratio symbol is returned when stringifying ratios

This commit is contained in:
Martin Hořeňovský 2021-10-03 20:23:10 +02:00
parent d65ee04b74
commit 48a889859b
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -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'; }
};
////////////