[ox] Remove std::move calls that suppressed copy elision
This commit is contained in:
parent
37664ede05
commit
163fcf1785
4
deps/ox/src/ox/claw/write.hpp
vendored
4
deps/ox/src/ox/claw/write.hpp
vendored
@ -77,7 +77,7 @@ Result<String> writeClawHeader(T *t, ClawFormat fmt) noexcept {
|
||||
out += tn;
|
||||
}
|
||||
out += ";";
|
||||
return std::move(out);
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
@ -89,7 +89,7 @@ Result<Buffer> writeClaw(T *t, ClawFormat fmt) {
|
||||
Buffer out(header.len() + data.size());
|
||||
memcpy(out.data(), header.data(), header.len());
|
||||
memcpy(out.data() + header.len(), data.data(), data.size());
|
||||
return std::move(out);
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ Result<Vector<String>> PassThroughFS::ls(const char *dir) noexcept {
|
||||
const auto u8p = p.path().filename().u8string();
|
||||
out.emplace_back(reinterpret_cast<const char*>(u8p.c_str()));
|
||||
}
|
||||
return std::move(out);
|
||||
return out;
|
||||
}
|
||||
|
||||
Error PassThroughFS::remove(const char *path, bool recursive) noexcept {
|
||||
|
2
deps/ox/src/ox/mc/write.hpp
vendored
2
deps/ox/src/ox/mc/write.hpp
vendored
@ -231,7 +231,7 @@ Result<Buffer> writeMC(T *val) noexcept {
|
||||
MetalClawWriter writer(reinterpret_cast<uint8_t*>(buff.data()), buff.size());
|
||||
oxReturnError(model(&writer, val));
|
||||
buff.resize(writer.size());
|
||||
return std::move(buff);
|
||||
return buff;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
8
deps/ox/src/ox/model/metadata.hpp
vendored
8
deps/ox/src/ox/model/metadata.hpp
vendored
@ -22,16 +22,14 @@
|
||||
#include "typenamecatcher.hpp"
|
||||
#include "types.hpp"
|
||||
|
||||
namespace ox {
|
||||
|
||||
namespace detail {
|
||||
namespace ox::detail {
|
||||
|
||||
template<bool>
|
||||
struct BoolWrapper {
|
||||
};
|
||||
|
||||
template<typename T, typename = BoolWrapper<true>>
|
||||
struct preloadable : false_type {
|
||||
struct preloadable: false_type {
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@ -59,5 +57,3 @@ struct preloadable<T, BoolWrapper<T::Preloadable>> {
|
||||
//};
|
||||
|
||||
}
|
||||
|
||||
}
|
2
deps/ox/src/ox/oc/read.hpp
vendored
2
deps/ox/src/ox/oc/read.hpp
vendored
@ -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>
|
||||
|
2
deps/ox/src/ox/oc/write.hpp
vendored
2
deps/ox/src/ox/oc/write.hpp
vendored
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user