mirror of
https://github.com/fmtlib/fmt.git
synced 2024-10-01 20:42:02 +00:00
Avoid extra reserve
This commit is contained in:
parent
58d792b6d3
commit
c9102619da
@ -3629,9 +3629,7 @@ auto write(OutputIt out, monostate, format_specs = {}, locale_ref = {})
|
||||
template <typename Char, typename OutputIt>
|
||||
FMT_CONSTEXPR auto write(OutputIt out, basic_string_view<Char> value)
|
||||
-> OutputIt {
|
||||
auto it = reserve(out, value.size());
|
||||
it = copy_noinline<Char>(value.begin(), value.end(), it);
|
||||
return base_iterator(out, it);
|
||||
return copy_noinline<Char>(value.begin(), value.end(), out);
|
||||
}
|
||||
|
||||
template <typename Char, typename OutputIt, typename T,
|
||||
|
Loading…
Reference in New Issue
Block a user