[ox/{claw,mc}] Fix write functions to move return values
This commit is contained in:
parent
947b1e7798
commit
1da5e60655
2
deps/ox/src/ox/claw/write.hpp
vendored
2
deps/ox/src/ox/claw/write.hpp
vendored
@ -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 out;
|
||||
return move(out);
|
||||
}
|
||||
|
||||
}
|
||||
|
2
deps/ox/src/ox/mc/write.hpp
vendored
2
deps/ox/src/ox/mc/write.hpp
vendored
@ -228,7 +228,7 @@ Result<Buffer> writeMC(T *val) {
|
||||
MetalClawWriter writer(bit_cast<uint8_t*>(buff.data()), buff.size());
|
||||
oxReturnError(model(&writer, val));
|
||||
buff.resize(writer.size());
|
||||
return buff;
|
||||
return move(buff);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user