General: Apply the const specifier where applicable

This commit is contained in:
Lioncash
2015-04-15 00:38:21 -04:00
parent 7506c386cf
commit b0613bb1c8
39 changed files with 75 additions and 75 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);

View 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();

View File

@ -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; }