mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2025-01-21 01:02:10 +00:00
Update format.h
To prevent the following compiler message: [...]/include/fmt/format.h:392:20: warning: conversion to 'long unsigned int' from 'int' may change the sign of the result [-Wsign-conversion] 392 | unsigned value[size]; | ^~~~
This commit is contained in:
parent
cbc59ca893
commit
70dc3de053
@ -389,7 +389,7 @@ template <typename To, typename From, FMT_ENABLE_IF(sizeof(To) > sizeof(From))>
|
||||
inline auto bit_cast(const From& from) -> To {
|
||||
constexpr auto size = static_cast<int>(sizeof(From) / sizeof(unsigned));
|
||||
struct data_t {
|
||||
unsigned value[size];
|
||||
unsigned value[static_cast<unsigned>(size)];
|
||||
} data = bit_cast<data_t>(from);
|
||||
auto result = To();
|
||||
if (const_check(is_big_endian())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user