Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
KKhanhH committed Sep 14, 2024
1 parent d09e5a2 commit 9981575
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 6 additions & 5 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -1212,11 +1212,11 @@ class tm_writer {
}
uint32_or_64_or_128_t<long long> n = to_unsigned(year);
const int num_digits = count_digits(n);
if(negative && pad == pad_type::zero) *out_++ = '-';
if (negative && pad == pad_type::zero) *out_++ = '-';
if (width > num_digits) {
out_ = detail::write_padding(out_, pad, width - num_digits);
}
if(negative && pad != pad_type::zero) *out_++ = '-';
if (negative && pad != pad_type::zero) *out_++ = '-';
out_ = format_decimal<Char>(out_, n, num_digits);
}
void write_year(long long year, pad_type pad) {
Expand Down Expand Up @@ -1450,7 +1450,9 @@ class tm_writer {
format_localized('V', 'O');
}

void on_iso_week_based_year() { write_year(tm_iso_week_year(), pad_type::zero); }
void on_iso_week_based_year() {
write_year(tm_iso_week_year(), pad_type::zero);
}
void on_iso_week_based_short_year() {
write2(split_year_lower(tm_iso_week_year()));
}
Expand All @@ -1460,8 +1462,7 @@ class tm_writer {
auto digit1 = yday / 100;
if (digit1 != 0) {
write1(digit1);
}
else {
} else {
out_ = detail::write_padding(out_, pad);
}
write2(yday % 100, pad);
Expand Down
3 changes: 1 addition & 2 deletions include/fmt/xchar.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ template <> struct is_char<char16_t> : std::true_type {};
template <> struct is_char<char32_t> : std::true_type {};

#ifdef __cpp_char8_t
template <>
struct is_char<char8_t> : bool_constant<detail::is_utf8_enabled> {};
template <> struct is_char<char8_t> : bool_constant<detail::is_utf8_enabled> {};
#endif

template <typename... T>
Expand Down

0 comments on commit 9981575

Please sign in to comment.