mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-28 16:46:16 +02:00
Avoid unnecessary string copy
This commit is contained in:
parent
e7c42e55e9
commit
1dc58110fe
1 changed files with 1 additions and 1 deletions
|
@ -718,7 +718,7 @@ inline std::string operator + (const std::string & s1, std::string_view s2)
|
||||||
inline std::string operator + (std::string && s, std::string_view s2)
|
inline std::string operator + (std::string && s, std::string_view s2)
|
||||||
{
|
{
|
||||||
s.append(s2);
|
s.append(s2);
|
||||||
return s;
|
return std::move(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string operator + (std::string_view s1, const char * s2)
|
inline std::string operator + (std::string_view s1, const char * s2)
|
||||||
|
|
Loading…
Reference in a new issue