diff --git a/deps/ox/src/ox/claw/read.cpp b/deps/ox/src/ox/claw/read.cpp index 20601d39..21cf09b1 100644 --- a/deps/ox/src/ox/claw/read.cpp +++ b/deps/ox/src/ox/claw/read.cpp @@ -72,8 +72,8 @@ Result stripClawHeader(const ox::Buffer &buff) noexcept { return stripClawHeader(buff.data(), buff.size()); } -Result readClaw(TypeStore *ts, const Buffer &buff) noexcept { - oxRequire(header, readClawHeader(buff)); +Result readClaw(TypeStore *ts, const char *buff, std::size_t buffSz) noexcept { + oxRequire(header, readClawHeader(buff, buffSz)); oxRequire(t, ts->getLoad(header.typeName, header.typeVersion, header.typeParams)); ModelObject obj; oxReturnError(obj.setType(t)); @@ -102,4 +102,8 @@ Result readClaw(TypeStore *ts, const Buffer &buff) noexcept { return OxError(1); } +Result readClaw(TypeStore *ts, const Buffer &buff) noexcept { + return readClaw(ts, buff.data(), buff.size()); +} + } diff --git a/deps/ox/src/ox/claw/read.hpp b/deps/ox/src/ox/claw/read.hpp index a0d96fa8..1d6c7dbf 100644 --- a/deps/ox/src/ox/claw/read.hpp +++ b/deps/ox/src/ox/claw/read.hpp @@ -87,6 +87,8 @@ Result readClaw(const Buffer &buff) { return readClaw(buff.data(), buff.size()); } +Result readClaw(TypeStore *ts, const char *buff, std::size_t buffSz) noexcept; + Result readClaw(TypeStore *ts, const Buffer &buff) noexcept; }