Skip to content

Commit

Permalink
no pessimizing move
Browse files Browse the repository at this point in the history
  • Loading branch information
gajop committed May 10, 2020
1 parent bdaa8d7 commit ba93bc9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rts/Game/ClientData.cpp
Expand Up @@ -37,6 +37,6 @@ std::string ClientData::GetUncompressed(const std::vector<std::uint8_t>& compres
std::vector<std::uint8_t> buffer{zlib::inflate(compressed)};
std::string cdata{buffer.begin(), buffer.end()};

return (std::move(cdata));
return cdata;
}

4 changes: 2 additions & 2 deletions rts/Rendering/Shaders/Shader.cpp
Expand Up @@ -115,7 +115,7 @@ std::string Shader::GetShaderVersionDirective(std::string& srcText)
srcText.erase(pos, eol - pos);
}

return (std::move(version));
return version;
}

/*****************************************************************/
Expand Down Expand Up @@ -548,7 +548,7 @@ namespace Shader {
programLog.append(shaderLog);
}

return (std::move(cso));
return cso;
}
}

2 changes: 1 addition & 1 deletion rts/System/EventHandler.cpp
Expand Up @@ -681,7 +681,7 @@ template<typename T, typename F, typename... A> std::string ControlReverseIterat
if (str.empty())
continue;

return (std::move(str));
return str;
}

return {};
Expand Down
4 changes: 2 additions & 2 deletions rts/System/StringUtil.cpp
Expand Up @@ -259,7 +259,7 @@ std::vector<std::uint8_t> zlib::deflate(const std::uint8_t* inflData, unsigned l
deflData.clear();
}

return (std::move(deflData));
return deflData;
}

std::vector<std::uint8_t> zlib::inflate(const std::vector<std::uint8_t>& deflData) { return (zlib::inflate(deflData.data(), deflData.size())); }
Expand All @@ -286,6 +286,6 @@ std::vector<std::uint8_t> zlib::inflate(const std::uint8_t* deflData, unsigned l
inflData.resize(rawSize);
inflData.shrink_to_fit();

return (std::move(inflData));
return inflData;
}
#endif //UNITSYNC

0 comments on commit ba93bc9

Please sign in to comment.