mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Fix more warnings
This commit is contained in:
parent
230b24944c
commit
ec24342b2b
@ -1186,8 +1186,8 @@ template <typename Context> class basic_format_args {
|
||||
Constructs a `basic_format_args` object from a dynamic set of arguments.
|
||||
\endrst
|
||||
*/
|
||||
basic_format_args(const format_arg* args, size_type count)
|
||||
: types_(internal::is_unpacked_bit | count) {
|
||||
basic_format_args(const format_arg* args, int count)
|
||||
: types_(internal::is_unpacked_bit | internal::to_unsigned(count)) {
|
||||
set_data(args);
|
||||
}
|
||||
|
||||
@ -1201,7 +1201,7 @@ template <typename Context> class basic_format_args {
|
||||
|
||||
int max_size() const {
|
||||
unsigned long long max_packed = internal::max_packed_args;
|
||||
return static_cast<size_type>(
|
||||
return static_cast<int>(
|
||||
is_packed() ? max_packed : types_ & ~internal::is_unpacked_bit);
|
||||
}
|
||||
};
|
||||
|
@ -1252,7 +1252,7 @@ class cstring_type_checker : public ErrorHandler {
|
||||
template <typename Context>
|
||||
void arg_map<Context>::init(const basic_format_args<Context>& args) {
|
||||
if (map_) return;
|
||||
map_ = new entry[args.max_size()];
|
||||
map_ = new entry[internal::to_unsigned(args.max_size())];
|
||||
if (args.is_packed()) {
|
||||
for (int i = 0;; ++i) {
|
||||
internal::type arg_type = args.type(i);
|
||||
|
Loading…
Reference in New Issue
Block a user