diff --git a/deps/ox/src/ox/mc/read.hpp b/deps/ox/src/ox/mc/read.hpp index d2259d13..da760bf5 100644 --- a/deps/ox/src/ox/mc/read.hpp +++ b/deps/ox/src/ox/mc/read.hpp @@ -10,6 +10,7 @@ #include #include +#include #include "err.hpp" #include "optype.hpp" #include "presencemask.hpp" @@ -49,6 +50,9 @@ class MetalClawReader { template int op(const char*, T *val, std::size_t len); + template + int op(const char*, ox::Vector *val); + template int op(const char*, T *val); @@ -160,6 +164,11 @@ int MetalClawReader::op(const char*, T *val, std::size_t valLen) { return err; }; +template +int MetalClawReader::op(const char*, ox::Vector *val) { + return op(nullptr, val->data(), val->size()); +} + template int readMC(uint8_t *buff, std::size_t buffLen, T *val) { MetalClawReader reader(buff, buffLen); diff --git a/deps/ox/src/ox/mc/write.hpp b/deps/ox/src/ox/mc/write.hpp index 162f31ea..9d28e389 100644 --- a/deps/ox/src/ox/mc/write.hpp +++ b/deps/ox/src/ox/mc/write.hpp @@ -10,6 +10,7 @@ #include #include +#include #include #include "err.hpp" #include "optype.hpp" @@ -48,6 +49,9 @@ class MetalClawWriter { template int op(const char*, T *val, std::size_t len); + template + int op(const char*, ox::Vector *val); + template int op(const char*, const char *val); @@ -111,6 +115,11 @@ int MetalClawWriter::op(const char*, T *val) { return err; } +template +int MetalClawWriter::op(const char*, ox::Vector *val) { + return op(nullptr, val->data(), val->size()); +} + template int MetalClawWriter::appendInteger(I val) { int err = 0;