mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
General: Apply the const specifier where applicable
This commit is contained in:
@ -12,19 +12,19 @@
|
||||
#include "Core/PowerPC/JitCommon/JitBase.h"
|
||||
#include "Core/PowerPC/JitCommon/JitCache.h"
|
||||
|
||||
bool BreakPoints::IsAddressBreakPoint(u32 _iAddress)
|
||||
bool BreakPoints::IsAddressBreakPoint(u32 address) const
|
||||
{
|
||||
for (const TBreakPoint& bp : m_BreakPoints)
|
||||
if (bp.iAddress == _iAddress)
|
||||
if (bp.iAddress == address)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BreakPoints::IsTempBreakPoint(u32 _iAddress)
|
||||
bool BreakPoints::IsTempBreakPoint(u32 address) const
|
||||
{
|
||||
for (const TBreakPoint& bp : m_BreakPoints)
|
||||
if (bp.iAddress == _iAddress && bp.bTemporary)
|
||||
if (bp.iAddress == address && bp.bTemporary)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -64,8 +64,8 @@ public:
|
||||
void AddFromStrings(const TBreakPointsStr& bps);
|
||||
|
||||
// is address breakpoint
|
||||
bool IsAddressBreakPoint(u32 _iAddress);
|
||||
bool IsTempBreakPoint(u32 _iAddress);
|
||||
bool IsAddressBreakPoint(u32 address) const;
|
||||
bool IsTempBreakPoint(u32 address) const;
|
||||
|
||||
// Add BreakPoint
|
||||
void Add(u32 em_address, bool temp = false);
|
||||
|
@ -949,7 +949,7 @@ bool IOFile::Seek(s64 off, int origin)
|
||||
return m_good;
|
||||
}
|
||||
|
||||
u64 IOFile::Tell()
|
||||
u64 IOFile::Tell() const
|
||||
{
|
||||
if (IsOpen())
|
||||
return ftello(m_file);
|
||||
|
@ -203,10 +203,10 @@ public:
|
||||
return WriteArray(reinterpret_cast<const char*>(data), length);
|
||||
}
|
||||
|
||||
bool IsOpen() { return nullptr != m_file; }
|
||||
bool IsOpen() const { return nullptr != m_file; }
|
||||
|
||||
// m_good is set to false when a read, write or other function fails
|
||||
bool IsGood() { return m_good; }
|
||||
bool IsGood() const { return m_good; }
|
||||
operator void*() { return m_good ? m_file : nullptr; }
|
||||
|
||||
std::FILE* ReleaseHandle();
|
||||
@ -216,7 +216,7 @@ public:
|
||||
void SetHandle(std::FILE* file);
|
||||
|
||||
bool Seek(s64 off, int origin);
|
||||
u64 Tell();
|
||||
u64 Tell() const;
|
||||
u64 GetSize();
|
||||
bool Resize(u64 size);
|
||||
bool Flush();
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
|
||||
void Log(LogTypes::LOG_LEVELS, const char *msg) override;
|
||||
|
||||
bool IsValid() { return !m_logfile.fail(); }
|
||||
bool IsValid() const { return m_logfile.good(); }
|
||||
bool IsEnabled() const { return m_enable; }
|
||||
void SetEnable(bool enable) { m_enable = enable; }
|
||||
|
||||
|
Reference in New Issue
Block a user