diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-08-27 18:26:36 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-08-27 18:26:36 +0200 |
| commit | 88f45198413c180e608a485a1a70b9cd5a919e83 (patch) | |
| tree | d8b791ac5bd77d1838e28e0ee0fcb14a4544e287 /libs | |
| parent | d5cd2c12ced66b8ad4c1e25292978d9ae9e35592 (diff) | |
| download | kernel-88f45198413c180e608a485a1a70b9cd5a919e83.tar.xz kernel-88f45198413c180e608a485a1a70b9cd5a919e83.zip | |
kstd: units: improve formatter
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/kstd/kstd/units.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/kstd/kstd/units.hpp b/libs/kstd/kstd/units.hpp index 95e531b8..1a4826db 100644 --- a/libs/kstd/kstd/units.hpp +++ b/libs/kstd/kstd/units.hpp @@ -134,7 +134,10 @@ struct kstd::formatter<kstd::bytes> : kstd::formatter<std::size_t> constexpr auto format(kstd::bytes const & id, kstd::format_context & ctx) const -> void { kstd::formatter<std::size_t>::format(id.value, ctx); - ctx.push(" bytes"); + if (specifiers.alternative_form) + { + ctx.push(" bytes"); + } } }; #endif |
