From aa47ac85c96e83b5e7460ebbe7175daa176ba412 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 5 Oct 2018 23:23:09 +0300 Subject: [PATCH] add constexpr to hex chars --- include/spdlog/fmt/bin_to_hex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 2c43ec2a..d8d0d9f9 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -111,8 +111,8 @@ struct formatter> template auto format(const spdlog::details::bytes_range &the_range, FormatContext &ctx) -> decltype(ctx.out()) { - const char *hex_upper = "0123456789ABCDEF"; - const char *hex_lower = "0123456789abcdef"; + constexpr const char *hex_upper = "0123456789ABCDEF"; + constexpr const char *hex_lower = "0123456789abcdef"; const char *hex_chars = use_uppercase ? hex_upper : hex_lower; std::size_t pos = 0;