Skip to content

Commit

Permalink
static_cast<unsigned>(id)
Browse files Browse the repository at this point in the history
  • Loading branch information
marlenecota committed Apr 30, 2024
1 parent a8f522b commit 58c6ecc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1899,12 +1899,10 @@ template <typename Context> class basic_format_args {
if (id < max_size()) arg = args_[id];
return arg;
}
if (id >= detail::max_packed_args) return arg;
if (static_cast<unsigned>(id) >= detail::max_packed_args) return arg;
arg.type_ = type(id);
if (arg.type_ == detail::type::none_type) return arg;
if (id >= 0) {
arg.value_ = values_[id];
}
arg.value_ = values_[id];
return arg;
}

Expand Down

0 comments on commit 58c6ecc

Please sign in to comment.