[ox/{claw,mc}] Fix write functions to move return values

This commit is contained in:
Gary Talent 2021-05-03 20:37:20 -04:00
parent 947b1e7798
commit 1da5e60655
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ Result<Buffer> writeClaw(T *t, ClawFormat fmt) {
Buffer out(header.len() + data.size()); Buffer out(header.len() + data.size());
memcpy(out.data(), header.data(), header.len()); memcpy(out.data(), header.data(), header.len());
memcpy(out.data() + header.len(), data.data(), data.size()); memcpy(out.data() + header.len(), data.data(), data.size());
return out; return move(out);
} }
} }

View File

@ -228,7 +228,7 @@ Result<Buffer> writeMC(T *val) {
MetalClawWriter writer(bit_cast<uint8_t*>(buff.data()), buff.size()); MetalClawWriter writer(bit_cast<uint8_t*>(buff.data()), buff.size());
oxReturnError(model(&writer, val)); oxReturnError(model(&writer, val));
buff.resize(writer.size()); buff.resize(writer.size());
return buff; return move(buff);
} }
template<typename T> template<typename T>