From ee851d7013e8652b013df711f98e70eb827c77c6 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 29 May 2022 01:19:25 -0500 Subject: [PATCH] [ox/claw] Add readClaw function that uses an existing instance of T --- deps/ox/src/ox/claw/read.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deps/ox/src/ox/claw/read.hpp b/deps/ox/src/ox/claw/read.hpp index 8a016c15..b5f7fa71 100644 --- a/deps/ox/src/ox/claw/read.hpp +++ b/deps/ox/src/ox/claw/read.hpp @@ -75,6 +75,11 @@ Result readClaw(const char *buff, std::size_t buffLen) { return val; } +template +Error readClaw(const Buffer &buff, T *val) { + return readClaw(buff.data(), buff.size(), val); +} + template Result readClaw(const Buffer &buff) { return readClaw(buff.data(), buff.size());