Use std::back_inserter
This commit is contained in:
parent
cb515ba42f
commit
b13820f520
@ -73,7 +73,7 @@ template <typename StringView> inline auto decompose(const StringView &lhs, cons
|
||||
std::string str;
|
||||
str.reserve(view.size());
|
||||
std::transform(
|
||||
str.begin(), str.end(), str.begin(), [](unsigned char c) { return std::tolower(c); });
|
||||
view.begin(), view.end(), std::back_inserter(str), [](unsigned char c) { return std::tolower(c); });
|
||||
auto front = str.find_first_not_of(' ');
|
||||
|
||||
if (front == std::string::npos)
|
||||
|
Loading…
Reference in New Issue
Block a user