From 707d7d923a117df956fe7adf762ec48ecc5d6b55 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 27 Jul 2024 09:00:25 -0700 Subject: [PATCH] Apply coding conventions --- include/fmt/base.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 19cf4916..e29ff140 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1855,7 +1855,7 @@ template class basic_format_args { FMT_CONSTEXPR auto type(int index) const -> detail::type { int shift = index * detail::packed_arg_bits; - unsigned int mask = (1 << detail::packed_arg_bits) - 1; + unsigned mask = (1 << detail::packed_arg_bits) - 1; return static_cast((desc_ >> shift) & mask); } @@ -1895,8 +1895,7 @@ template class basic_format_args { } if (static_cast(id) >= detail::max_packed_args) return arg; arg.type_ = type(id); - if (arg.type_ == detail::type::none_type) return arg; - arg.value_ = values_[id]; + if (arg.type_ != detail::type::none_type) arg.value_ = values_[id]; return arg; }