From 4c3e0b7fe85a2210260480d848a29dea876d6b7f 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 (synced from ee851d7013e8652b013df711f98e70eb827c77c6) --- src/ox/claw/read.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ox/claw/read.hpp b/src/ox/claw/read.hpp index 8a016c152..b5f7fa71e 100644 --- a/src/ox/claw/read.hpp +++ b/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());