From d4ab8fb401331cd91bd6fab32fec4e3ea375a07a Mon Sep 17 00:00:00 2001 From: rexy712 Date: Thu, 30 Jun 2022 10:43:35 -0700 Subject: [PATCH] List initialize default integer types because I think it looks better --- include/rexy/detail/format/storage.tpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/rexy/detail/format/storage.tpp b/include/rexy/detail/format/storage.tpp index 0f6594a..fb822b5 100644 --- a/include/rexy/detail/format/storage.tpp +++ b/include/rexy/detail/format/storage.tpp @@ -76,16 +76,19 @@ namespace rexy::fmt::detail{ constexpr auto operator()(T) -> typename basic_format_arg::handle; constexpr auto operator()(std::unsigned_integral auto i){ if constexpr(sizeof(i) <= sizeof(unsigned int)){ - return (unsigned int)(0); + using uint = unsigned int; + return uint{}; }else{ - return (unsigned long long)(0); + using ull = unsigned long long; + return ull{}; } } constexpr auto operator()(std::signed_integral auto i){ if constexpr(sizeof(i) <= sizeof(int)){ - return int(0); + return int{}; }else{ - return (long long)(0); + using ll = long long; + return ll{}; } } template