Skip to content

Commit

Permalink
refactor: remove useless cast (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
Viatorus authored Nov 8, 2023
1 parent 3452749 commit 0da267a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/emio/detail/format/formatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ constexpr result<void> write_arg(writer& out, format_specs& specs, const Arg& ar
}

return write_padded<alignment::right>(out, specs, total_width, [&, &opt = options]() noexcept -> result<void> {
const size_t area_size =
num_digits + static_cast<size_t>(sign_to_write != no_sign) + static_cast<size_t>(prefix_to_write.size());
const size_t area_size = num_digits + static_cast<size_t>(sign_to_write != no_sign) + prefix_to_write.size();
EMIO_TRY(auto area, out.get_buffer().get_write_area_of(area_size));
auto* it = area.data();
if (sign_to_write != no_sign) {
Expand Down

0 comments on commit 0da267a

Please sign in to comment.