From 357dc72f97d812bf5d393d5f7216af8aa2d2c95a Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Tue, 10 May 2022 16:37:51 -0700 Subject: [PATCH] fmt: fix 'unused variable' warnings --- Externals/fmt/include/fmt/core.h | 8 ++++---- Externals/fmt/include/fmt/format.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Externals/fmt/include/fmt/core.h b/Externals/fmt/include/fmt/core.h index 8dea0508a2..3905a00197 100755 --- a/Externals/fmt/include/fmt/core.h +++ b/Externals/fmt/include/fmt/core.h @@ -1702,11 +1702,11 @@ template FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value { const auto& arg = arg_mapper().map(std::forward(val)); - constexpr bool formattable_char = + [[maybe_unused]] constexpr bool formattable_char = !std::is_same::value; static_assert(formattable_char, "Mixing character types is disallowed."); - constexpr bool formattable_const = + [[maybe_unused]] constexpr bool formattable_const = !std::is_same::value; static_assert(formattable_const, "Cannot format a const argument."); @@ -1714,12 +1714,12 @@ FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value { // a pointer cast it to "void *" or "const void *". In particular, this // forbids formatting of "[const] volatile char *" which is printed as bool // by iostreams. - constexpr bool formattable_pointer = + [[maybe_unused]] constexpr bool formattable_pointer = !std::is_same::value; static_assert(formattable_pointer, "Formatting of non-void pointers is disallowed."); - constexpr bool formattable = + [[maybe_unused]] constexpr bool formattable = !std::is_same::value; static_assert( formattable, diff --git a/Externals/fmt/include/fmt/format.h b/Externals/fmt/include/fmt/format.h index d35207c8e2..5f8c783bbe 100755 --- a/Externals/fmt/include/fmt/format.h +++ b/Externals/fmt/include/fmt/format.h @@ -2198,7 +2198,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& fp, -> OutputIt { auto significand = fp.significand; int significand_size = get_significand_size(fp); - constexpr Char zero = static_cast('0'); + static constexpr Char zero = static_cast('0'); auto sign = fspecs.sign; size_t size = to_unsigned(significand_size) + (sign ? 1 : 0); using iterator = reserve_iterator;