From 59a506305fd54dcfda3a7d53605836ce39138868 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Tue, 2 Jan 2024 14:56:28 +0100 Subject: [PATCH] CMemory: add reference overload Assign pointer to reference. --- src/public/tier0/memaddr.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/public/tier0/memaddr.h b/src/public/tier0/memaddr.h index 6223fe73..97ffa46b 100644 --- a/src/public/tier0/memaddr.h +++ b/src/public/tier0/memaddr.h @@ -48,6 +48,12 @@ public: return ptr; } + template + inline void GetPtr(T*& outPtr) const + { + outPtr = reinterpret_cast(ptr); + } + template inline T GetValue(void) const { return *reinterpret_cast(ptr);