Skip to content

Commit

Permalink
Rename set_fill to copy_fill_from
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jan 11, 2025
1 parent 5750f43 commit 586ea06
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ class basic_specs {
fill_data_[i & 3] = static_cast<char>(s[i]);
}

FMT_CONSTEXPR void set_fill(const basic_specs& specs) {
FMT_CONSTEXPR void copy_fill_from(const basic_specs& specs) {
set_fill_size(specs.fill_size());
for (size_t i = 0; i < max_fill_size; ++i)
fill_data_[i] = specs.fill_data_[i];
Expand Down
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -3968,7 +3968,7 @@ template <typename T, typename Char = char> struct nested_formatter {
write(basic_appender<Char>(buf));
auto specs = format_specs();
specs.width = width_;
specs.set_fill(specs_);
specs.copy_fill_from(specs_);
specs.set_align(specs_.align());
return detail::write<Char>(
ctx.out(), basic_string_view<Char>(buf.data(), buf.size()), specs);
Expand Down
2 changes: 1 addition & 1 deletion include/fmt/std.h
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ template <typename T, typename Char> struct formatter<std::complex<T>, Char> {

auto outer_specs = format_specs();
outer_specs.width = specs.width;
outer_specs.set_fill(specs);
outer_specs.copy_fill_from(specs);
outer_specs.set_align(specs.align());

specs.width = 0;
Expand Down

0 comments on commit 586ea06

Please sign in to comment.