Core/CheatSearchSession: Make a few methods const.

This commit is contained in:
Admiral H. Curtiss 2021-10-28 02:16:19 +02:00
parent 6e814cbb8f
commit b154ba513c
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
2 changed files with 15 additions and 15 deletions

View File

@ -478,31 +478,31 @@ Cheats::SearchErrorCode Cheats::CheatSearchSession<T>::RunSearch()
} }
template <typename T> template <typename T>
size_t Cheats::CheatSearchSession<T>::GetMemoryRangeCount() size_t Cheats::CheatSearchSession<T>::GetMemoryRangeCount() const
{ {
return m_memory_ranges.size(); return m_memory_ranges.size();
} }
template <typename T> template <typename T>
Cheats::MemoryRange Cheats::CheatSearchSession<T>::GetMemoryRange(size_t index) Cheats::MemoryRange Cheats::CheatSearchSession<T>::GetMemoryRange(size_t index) const
{ {
return m_memory_ranges[index]; return m_memory_ranges[index];
} }
template <typename T> template <typename T>
PowerPC::RequestedAddressSpace Cheats::CheatSearchSession<T>::GetAddressSpace() PowerPC::RequestedAddressSpace Cheats::CheatSearchSession<T>::GetAddressSpace() const
{ {
return m_address_space; return m_address_space;
} }
template <typename T> template <typename T>
Cheats::DataType Cheats::CheatSearchSession<T>::GetDataType() Cheats::DataType Cheats::CheatSearchSession<T>::GetDataType() const
{ {
return Cheats::GetDataType(Cheats::SearchValue{T(0)}); return Cheats::GetDataType(Cheats::SearchValue{T(0)});
} }
template <typename T> template <typename T>
bool Cheats::CheatSearchSession<T>::GetAligned() bool Cheats::CheatSearchSession<T>::GetAligned() const
{ {
return m_aligned; return m_aligned;
} }

View File

@ -140,11 +140,11 @@ public:
// Run either a new search or a next search based on the current state of this session. // Run either a new search or a next search based on the current state of this session.
virtual SearchErrorCode RunSearch() = 0; virtual SearchErrorCode RunSearch() = 0;
virtual size_t GetMemoryRangeCount() = 0; virtual size_t GetMemoryRangeCount() const = 0;
virtual MemoryRange GetMemoryRange(size_t index) = 0; virtual MemoryRange GetMemoryRange(size_t index) const = 0;
virtual PowerPC::RequestedAddressSpace GetAddressSpace() = 0; virtual PowerPC::RequestedAddressSpace GetAddressSpace() const = 0;
virtual DataType GetDataType() = 0; virtual DataType GetDataType() const = 0;
virtual bool GetAligned() = 0; virtual bool GetAligned() const = 0;
virtual bool IsIntegerType() const = 0; virtual bool IsIntegerType() const = 0;
virtual bool IsFloatingType() const = 0; virtual bool IsFloatingType() const = 0;
@ -186,11 +186,11 @@ public:
void ResetResults() override; void ResetResults() override;
SearchErrorCode RunSearch() override; SearchErrorCode RunSearch() override;
size_t GetMemoryRangeCount() override; size_t GetMemoryRangeCount() const override;
MemoryRange GetMemoryRange(size_t index) override; MemoryRange GetMemoryRange(size_t index) const override;
PowerPC::RequestedAddressSpace GetAddressSpace() override; PowerPC::RequestedAddressSpace GetAddressSpace() const override;
DataType GetDataType() override; DataType GetDataType() const override;
bool GetAligned() override; bool GetAligned() const override;
bool IsIntegerType() const override; bool IsIntegerType() const override;
bool IsFloatingType() const override; bool IsFloatingType() const override;