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> | |||
| 53 | std::string out; | 53 | std::string out; |
| 54 | out.reserve(std::size(data) * pad_width); | 54 | out.reserve(std::size(data) * pad_width); |
| 55 | 55 | ||
| 56 | const auto format_str = fmt::runtime(upper ? "{:02X}" : "{:02x}"); | ||
| 56 | for (const u8 c : data) { | 57 | for (const u8 c : data) { |
| 57 | out += fmt::format(upper ? "{:02X}" : "{:02x}", c); | 58 | out += fmt::format(format_str, c); |
| 58 | } | 59 | } |
| 59 | 60 | ||
| 60 | return out; | 61 | 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 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #pragma once | ||
| 6 | |||
| 5 | #include <chrono> | 7 | #include <chrono> |
| 6 | 8 | ||
| 7 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |