Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove useless cast #79

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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