Skip to content

Commit dd16481

Browse files
committed
Remove const mark for CMemory base field
1 parent 424e556 commit dd16481

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/dynlibutils/memaddr.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class CMemory
9393
constexpr CMemory& operator=(const CMemory&) noexcept = default;
9494
constexpr CMemory(CMemory&& other) noexcept : m_addr(std::move(other.m_addr)) {}
9595
constexpr CMemory(const std::uintptr_t addr) : m_addr(addr) {}
96-
constexpr CMemory(const void* ptr = nullptr) : m_ptr(ptr) {}
96+
constexpr CMemory(void* ptr = nullptr) : m_ptr(ptr) {}
9797

9898
/// Conversion operators.
9999
constexpr operator const void*() const noexcept { return GetPtr(); }
@@ -118,7 +118,7 @@ class CMemory
118118
template<typename PTR> constexpr PTR UCast() const noexcept { union { PTR cptr; std::uintptr_t addr; } cast; cast.addr = m_addr; return cast.cptr; }
119119

120120
/// Access methods.
121-
constexpr const void* GetPtr() const noexcept { return m_ptr; }
121+
constexpr void* GetPtr() const noexcept { return m_ptr; }
122122
constexpr std::ptrdiff_t GetAddr() const noexcept { return m_addr; }
123123
template<typename T> constexpr T &GetRef() const noexcept { return *RCast<T*>(); }
124124
template<typename T> constexpr T Get() const { return GetRef<T>(); }
@@ -221,7 +221,7 @@ class CMemory
221221
protected:
222222
union
223223
{
224-
const void* m_ptr;
224+
void* m_ptr;
225225
std::uintptr_t m_addr;
226226
};
227227
}; // class CMemory

0 commit comments

Comments
 (0)