[ox] Remove std::move calls that suppressed copy elision

This commit is contained in:
2021-12-01 19:55:09 -06:00
parent 37664ede05
commit 163fcf1785
6 changed files with 8 additions and 12 deletions

View File

@@ -228,7 +228,7 @@ template<typename T>
Result<T> readOC(const char *json, std::size_t jsonLen) noexcept {
T val;
oxReturnError(readOC(json, jsonLen, &val));
return std::move(val);
return val;
}
template<typename T>

View File

@@ -154,7 +154,7 @@ Result<Buffer> writeOC(T *val) noexcept {
const auto str = Json::writeString(jsonBuilder, writer.m_json);
Buffer buff(str.size() + 1);
memcpy(buff.data(), str.c_str(), str.size() + 1);
return std::move(buff);
return buff;
}
}