mirror of
https://github.com/fmtlib/fmt.git
synced 2026-04-30 19:09:22 +08:00
Add missing moves to grouping std::string member (#4704)
This commit is contained in:
parent
245e4d9723
commit
c0cd0fcfec
@ -1219,7 +1219,7 @@ FMT_API auto thousands_sep_impl(locale_ref loc) -> thousands_sep_result<Char>;
|
||||
template <typename Char>
|
||||
inline auto thousands_sep(locale_ref loc) -> thousands_sep_result<Char> {
|
||||
auto result = thousands_sep_impl<char>(loc);
|
||||
return {result.grouping, Char(result.thousands_sep)};
|
||||
return {std::move(result.grouping), Char(result.thousands_sep)};
|
||||
}
|
||||
template <>
|
||||
inline auto thousands_sep(locale_ref loc) -> thousands_sep_result<wchar_t> {
|
||||
@ -1968,7 +1968,7 @@ template <typename Char> class digit_grouping {
|
||||
explicit digit_grouping(locale_ref loc, bool localized = true) {
|
||||
if (!localized) return;
|
||||
auto sep = thousands_sep<Char>(loc);
|
||||
grouping_ = sep.grouping;
|
||||
grouping_ = std::move(sep.grouping);
|
||||
if (sep.thousands_sep) thousands_sep_.assign(1, sep.thousands_sep);
|
||||
}
|
||||
digit_grouping(std::string grouping, std::basic_string<Char> sep)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user