From: Amelia Coutard <eliottulio.coutard@gmail.com>
Date: Thu, 12 May 2022 11:05:17 +0000 (+0200)
Subject: Removed constexpr for the *, -> and [] operators, and get_virt_addr, of phys_ptr... 
X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=be5bf0a113c884f8825a64f13d8a21d536fdd024;p=voyage-au-centre-des-fichiers.git

Removed constexpr for the *, -> and [] operators, and get_virt_addr, of phys_ptr: it made no sense for those to be constexpr
---

diff --git a/src/phys_ptr.hpp b/src/phys_ptr.hpp
index f614de8..1e5cb35 100644
--- a/src/phys_ptr.hpp
+++ b/src/phys_ptr.hpp
@@ -12,13 +12,13 @@ public:
 	constexpr explicit phys_ptr(std::uintptr_t phys_addr): phys_addr(phys_addr) {}
 	constexpr phys_ptr(std::nullptr_t): phys_addr(0) {}
 
-	constexpr T& operator[](std::size_t i) const {
+	T& operator[](std::size_t i) const {
 		return get_virt_addr()[i];
 	}
-	constexpr T& operator*() const {
+	T& operator*() const {
 		return *get_virt_addr();
 	}
-	constexpr T* operator->() const {
+	T* operator->() const {
 		return get_virt_addr();
 	}
 
@@ -68,7 +68,7 @@ public:
 	}
 
 private:
-	constexpr T* get_virt_addr() const {
+	T* get_virt_addr() const {
 		return reinterpret_cast<T*>(phys_addr + 0xFFFF800000000000);
 	}