diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/hex_util.h | 3 | ||||
-rw-r--r-- | src/common/logging/types.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/common/hex_util.h b/src/common/hex_util.h index a8d414fb8..f5f9e4507 100644 --- a/src/common/hex_util.h +++ b/src/common/hex_util.h @@ -53,8 +53,9 @@ template <typename ContiguousContainer> std::string out; out.reserve(std::size(data) * pad_width); + const auto format_str = fmt::runtime(upper ? "{:02X}" : "{:02x}"); for (const u8 c : data) { - out += fmt::format(upper ? "{:02X}" : "{:02x}", c); + out += fmt::format(format_str, c); } return out; diff --git a/src/common/logging/types.h b/src/common/logging/types.h index ee9a1ed84..88b0e9c01 100644 --- a/src/common/logging/types.h +++ b/src/common/logging/types.h @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#pragma once + #include <chrono> #include "common/common_types.h" |