From 16f7d985fc3764051060ae12cac93f88bb8877ba Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Sat, 30 Sep 2023 11:44:13 +0100 Subject: [PATCH] [+] Missing read/write AuByteBuffer by views --- Include/Aurora/Memory/ByteBuffer.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Include/Aurora/Memory/ByteBuffer.hpp b/Include/Aurora/Memory/ByteBuffer.hpp index 76240027..520f497e 100644 --- a/Include/Aurora/Memory/ByteBuffer.hpp +++ b/Include/Aurora/Memory/ByteBuffer.hpp @@ -491,6 +491,16 @@ namespace Aurora::Memory inline auline AuUInt Write(const void *buffer, AuUInt requestLength); inline auline AuUInt Read(void *out, AuUInt requestedLength, bool peek = false); + inline auline AuUInt Write(const MemoryViewRead &read) + { + return Write(read.ptr, read.length); + } + + inline auline AuUInt Read(const MemoryViewWrite &write) + { + return Read(write.ptr, write.length); + } + // String API inline bool WriteString(std::string_view string, EStringType type = EStringType::eStringDword, Locale::ECodePage codepage = Locale::ECodePage::eUTF8);