mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
More std::move changes based on Coverity findings
This commit is contained in:
parent
2390625732
commit
34ee136a3c
19 changed files with 48 additions and 45 deletions
|
@ -599,11 +599,11 @@ template<typename T>
|
|||
std::vector<T> split(T s, const T& delim) {
|
||||
// If there's no delimiter, return a copy of the existing string.
|
||||
if ( delim.empty() )
|
||||
return {T(s)};
|
||||
return {std::move(s)};
|
||||
|
||||
// If the delimiter won't fit in the string, just return a copy as well.
|
||||
if ( s.size() < delim.size() )
|
||||
return {T(s)};
|
||||
return {std::move(s)};
|
||||
|
||||
std::vector<T> l;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue