mirror of
https://github.com/fmtlib/fmt.git
synced 2024-10-02 04:52:03 +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>
|
template <typename Char, typename OutputIt>
|
||||||
FMT_CONSTEXPR auto write(OutputIt out, basic_string_view<Char> value)
|
FMT_CONSTEXPR auto write(OutputIt out, basic_string_view<Char> value)
|
||||||
-> OutputIt {
|
-> OutputIt {
|
||||||
auto it = reserve(out, value.size());
|
return copy_noinline<Char>(value.begin(), value.end(), out);
|
||||||
it = copy_noinline<Char>(value.begin(), value.end(), it);
|
|
||||||
return base_iterator(out, it);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Char, typename OutputIt, typename T,
|
template <typename Char, typename OutputIt, typename T,
|
||||||
|
Loading…
Reference in New Issue
Block a user