Tiny change: Deduplicate with as_const

This commit is contained in:
theidexisted
2022-01-06 18:40:57 +08:00
parent f46e1b8ca2
commit 4fd7fc70be
+1 -9
View File
@@ -308,15 +308,7 @@ public:
private: private:
template <Type type> template <Type type>
u64* Array() noexcept { u64* Array() noexcept {
if constexpr (type == Type::CPU) { return std::as_const(*this).Array();
return words.cpu.Pointer(IsShort());
} else if constexpr (type == Type::GPU) {
return words.gpu.Pointer(IsShort());
} else if constexpr (type == Type::CachedCPU) {
return words.cached_cpu.Pointer(IsShort());
} else if constexpr (type == Type::Untracked) {
return words.untracked.Pointer(IsShort());
}
} }
template <Type type> template <Type type>