A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/fmtlib/fmt/commit/6e462b89aa22fd5f737ed162d0150e145ccb1914 below:

Get rid of std::copy · fmtlib/fmt@6e462b8 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+5

-6

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+5

-6

lines changed Original file line number Diff line number Diff line change

@@ -560,31 +560,30 @@ struct formatter<detail::styled_arg<T>, Char> : formatter<T, Char> {

560 560

auto format(const detail::styled_arg<T>& arg, FormatContext& ctx) const

561 561

-> decltype(ctx.out()) {

562 562

const auto& ts = arg.style;

563 -

const auto& value = arg.value;

564 563

auto out = ctx.out();

565 564 566 565

bool has_style = false;

567 566

if (ts.has_emphasis()) {

568 567

has_style = true;

569 568

auto emphasis = detail::make_emphasis<Char>(ts.get_emphasis());

570 -

out = std::copy(emphasis.begin(), emphasis.end(), out);

569 +

out = detail::copy<Char>(emphasis.begin(), emphasis.end(), out);

571 570

}

572 571

if (ts.has_foreground()) {

573 572

has_style = true;

574 573

auto foreground =

575 574

detail::make_foreground_color<Char>(ts.get_foreground());

576 -

out = std::copy(foreground.begin(), foreground.end(), out);

575 +

out = detail::copy<Char>(foreground.begin(), foreground.end(), out);

577 576

}

578 577

if (ts.has_background()) {

579 578

has_style = true;

580 579

auto background =

581 580

detail::make_background_color<Char>(ts.get_background());

582 -

out = std::copy(background.begin(), background.end(), out);

581 +

out = detail::copy<Char>(background.begin(), background.end(), out);

583 582

}

584 -

out = formatter<T, Char>::format(value, ctx);

583 +

out = formatter<T, Char>::format(arg.value, ctx);

585 584

if (has_style) {

586 585

auto reset_color = string_view("\x1b[0m");

587 -

out = std::copy(reset_color.begin(), reset_color.end(), out);

586 +

out = detail::copy<Char>(reset_color.begin(), reset_color.end(), out);

588 587

}

589 588

return out;

590 589

}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4