Tiny change: Deduplicate with as_const
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user