Add missing moves to grouping std::string member (#4704)
This commit is contained in:
@@ -1219,7 +1219,7 @@ FMT_API auto thousands_sep_impl(locale_ref loc) -> thousands_sep_result<Char>;
|
|||||||
template <typename Char>
|
template <typename Char>
|
||||||
inline auto thousands_sep(locale_ref loc) -> thousands_sep_result<Char> {
|
inline auto thousands_sep(locale_ref loc) -> thousands_sep_result<Char> {
|
||||||
auto result = thousands_sep_impl<char>(loc);
|
auto result = thousands_sep_impl<char>(loc);
|
||||||
return {result.grouping, Char(result.thousands_sep)};
|
return {std::move(result.grouping), Char(result.thousands_sep)};
|
||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
inline auto thousands_sep(locale_ref loc) -> thousands_sep_result<wchar_t> {
|
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) {
|
explicit digit_grouping(locale_ref loc, bool localized = true) {
|
||||||
if (!localized) return;
|
if (!localized) return;
|
||||||
auto sep = thousands_sep<Char>(loc);
|
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);
|
if (sep.thousands_sep) thousands_sep_.assign(1, sep.thousands_sep);
|
||||||
}
|
}
|
||||||
digit_grouping(std::string grouping, std::basic_string<Char> sep)
|
digit_grouping(std::string grouping, std::basic_string<Char> sep)
|
||||||
|
|||||||
Reference in New Issue
Block a user