mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 19:24:48 +02:00
Changing type of data_ to size_t to avoid compilation warnings (#4200)
Changing type data_ to size_t because 1. If lib is cross-compiled for win32 using MXE environment it cause compilation warning -Wconversion on line 730 as sizeof(unsigned long) = 4 and sizeof(size_t) = 8 2. When lib is compiled on Unix like compiler generate warning -Wuseless-cast if static_cast is used to fix issue in 1
This commit is contained in:
@@ -721,7 +721,7 @@ class basic_specs {
|
|||||||
max_fill_size = 4
|
max_fill_size = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned long data_ = 1 << fill_size_shift;
|
size_t data_ = 1 << fill_size_shift;
|
||||||
|
|
||||||
// Character (code unit) type is erased to prevent template bloat.
|
// Character (code unit) type is erased to prevent template bloat.
|
||||||
char fill_data_[max_fill_size] = {' '};
|
char fill_data_[max_fill_size] = {' '};
|
||||||
|
Reference in New Issue
Block a user