mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 06:51:17 +01:00
fmt: fix 'unused variable' warnings
This commit is contained in:
parent
5bcc11a303
commit
357dc72f97
8
Externals/fmt/include/fmt/core.h
vendored
8
Externals/fmt/include/fmt/core.h
vendored
@ -1702,11 +1702,11 @@ template <typename Context, typename T>
|
|||||||
FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value<Context> {
|
FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value<Context> {
|
||||||
const auto& arg = arg_mapper<Context>().map(std::forward<T>(val));
|
const auto& arg = arg_mapper<Context>().map(std::forward<T>(val));
|
||||||
|
|
||||||
constexpr bool formattable_char =
|
[[maybe_unused]] constexpr bool formattable_char =
|
||||||
!std::is_same<decltype(arg), const unformattable_char&>::value;
|
!std::is_same<decltype(arg), const unformattable_char&>::value;
|
||||||
static_assert(formattable_char, "Mixing character types is disallowed.");
|
static_assert(formattable_char, "Mixing character types is disallowed.");
|
||||||
|
|
||||||
constexpr bool formattable_const =
|
[[maybe_unused]] constexpr bool formattable_const =
|
||||||
!std::is_same<decltype(arg), const unformattable_const&>::value;
|
!std::is_same<decltype(arg), const unformattable_const&>::value;
|
||||||
static_assert(formattable_const, "Cannot format a const argument.");
|
static_assert(formattable_const, "Cannot format a const argument.");
|
||||||
|
|
||||||
@ -1714,12 +1714,12 @@ FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value<Context> {
|
|||||||
// a pointer cast it to "void *" or "const void *". In particular, this
|
// a pointer cast it to "void *" or "const void *". In particular, this
|
||||||
// forbids formatting of "[const] volatile char *" which is printed as bool
|
// forbids formatting of "[const] volatile char *" which is printed as bool
|
||||||
// by iostreams.
|
// by iostreams.
|
||||||
constexpr bool formattable_pointer =
|
[[maybe_unused]] constexpr bool formattable_pointer =
|
||||||
!std::is_same<decltype(arg), const unformattable_pointer&>::value;
|
!std::is_same<decltype(arg), const unformattable_pointer&>::value;
|
||||||
static_assert(formattable_pointer,
|
static_assert(formattable_pointer,
|
||||||
"Formatting of non-void pointers is disallowed.");
|
"Formatting of non-void pointers is disallowed.");
|
||||||
|
|
||||||
constexpr bool formattable =
|
[[maybe_unused]] constexpr bool formattable =
|
||||||
!std::is_same<decltype(arg), const unformattable&>::value;
|
!std::is_same<decltype(arg), const unformattable&>::value;
|
||||||
static_assert(
|
static_assert(
|
||||||
formattable,
|
formattable,
|
||||||
|
2
Externals/fmt/include/fmt/format.h
vendored
2
Externals/fmt/include/fmt/format.h
vendored
@ -2198,7 +2198,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& fp,
|
|||||||
-> OutputIt {
|
-> OutputIt {
|
||||||
auto significand = fp.significand;
|
auto significand = fp.significand;
|
||||||
int significand_size = get_significand_size(fp);
|
int significand_size = get_significand_size(fp);
|
||||||
constexpr Char zero = static_cast<Char>('0');
|
static constexpr Char zero = static_cast<Char>('0');
|
||||||
auto sign = fspecs.sign;
|
auto sign = fspecs.sign;
|
||||||
size_t size = to_unsigned(significand_size) + (sign ? 1 : 0);
|
size_t size = to_unsigned(significand_size) + (sign ? 1 : 0);
|
||||||
using iterator = reserve_iterator<OutputIt>;
|
using iterator = reserve_iterator<OutputIt>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user