[ox/claw] Add readClaw function that uses an existing instance of T
This commit is contained in:
parent
40cc222cd8
commit
ee851d7013
5
deps/ox/src/ox/claw/read.hpp
vendored
5
deps/ox/src/ox/claw/read.hpp
vendored
@ -75,6 +75,11 @@ Result<T> readClaw(const char *buff, std::size_t buffLen) {
|
||||
return val;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Error readClaw(const Buffer &buff, T *val) {
|
||||
return readClaw<T>(buff.data(), buff.size(), val);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Result<T> readClaw(const Buffer &buff) {
|
||||
return readClaw<T>(buff.data(), buff.size());
|
||||
|
Loading…
Reference in New Issue
Block a user