Skip to content

Commit

Permalink
Silence narrowing warning in basic_specs::set_fill_size
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyCarter committed Oct 2, 2024
1 parent ab45340 commit 1accf6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,8 @@ class basic_specs {
char fill_data_[max_fill_size] = {' '};

FMT_CONSTEXPR void set_fill_size(size_t size) {
data_ = (data_ & ~fill_size_mask) | (size << fill_size_shift);
data_ &= ~fill_size_mask;
data_ |= static_cast<unsigned long>(size << fill_size_shift);
}

public:
Expand Down

0 comments on commit 1accf6c

Please sign in to comment.