add constexpr to hex chars

This commit is contained in:
gabime 2018-10-05 23:23:09 +03:00
parent 3eadda9466
commit aa47ac85c9
1 changed files with 2 additions and 2 deletions

View File

@ -111,8 +111,8 @@ struct formatter<spdlog::details::bytes_range<T>>
template<typename FormatContext, typename Container>
auto format(const spdlog::details::bytes_range<Container> &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;