summaryrefslogtreecommitdiff
path: root/src/common/hex_util.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-06-23 15:31:04 -0700
committerGitHub <noreply@github.com>2021-06-23 15:31:04 -0700
commit1b09d6628b7f268c256c12e4d3e373724671d2f1 (patch)
treeb1679d1c4bc044144798746332860939fe43d109 /src/common/hex_util.h
parent809e5fd52317f0a925ca463eca85a0b67d744f9e (diff)
parentd0b1f2bd05a2fcadbb4c148be2105e337dd986e8 (diff)
Merge pull request #6517 from lioncash/fmtlib
externals: Update fmt to 8.0.0
Diffstat (limited to 'src/common/hex_util.h')
-rw-r--r--src/common/hex_util.h3
1 files changed, 2 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;