General: Apply the const specifier where applicable

This commit is contained in:
Lioncash
2015-04-15 02:04:03 -04:00
parent 7506c386cf
commit b0613bb1c8
39 changed files with 75 additions and 75 deletions
+4 -4
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;
+2 -2
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);
+1 -1
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);
+3 -3
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();
+1 -1
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; }
+2 -2
View File
@@ -15,8 +15,8 @@ public:
CDolLoader(u8* _pBuffer, u32 _Size);
~CDolLoader();
bool IsWii() { return m_isWii; }
u32 GetEntryPoint() { return m_dolheader.entryPoint; }
bool IsWii() const { return m_isWii; }
u32 GetEntryPoint() const { return m_dolheader.entryPoint; }
// Load into emulated memory
void Load();
+1 -1
View File
@@ -69,7 +69,7 @@ public:
int GetSectionSize(SectionID section) const { return sections[section].sh_size; }
SectionID GetSectionByName(const char* name, int firstSection = 0) const; //-1 for not found
bool DidRelocate()
bool DidRelocate() const
{
return bRelocate;
}
+1 -1
View File
@@ -67,7 +67,7 @@ public:
void AddFrame(const FifoFrameInfo &frameInfo);
const FifoFrameInfo &GetFrame(u32 frame) const { return m_Frames[frame]; }
u32 GetFrameCount() { return static_cast<u32>(m_Frames.size()); }
u32 GetFrameCount() const { return static_cast<u32>(m_Frames.size()); }
bool Save(const std::string& filename);
+1 -1
View File
@@ -36,7 +36,7 @@ public:
void SetVideoMemory(u32 *bpMem, u32 *cpMem, u32 *xfMem, u32 *xfRegs, u32 xfRegsSize);
// Checked once per frame prior to callng EndFrame()
bool IsRecording() { return m_IsRecording; }
bool IsRecording() const { return m_IsRecording; }
static FifoRecorder &GetInstance();
+1 -1
View File
@@ -19,7 +19,7 @@ static const u32 INSTALLER_BASE_ADDRESS = 0x80001800;
static const u32 INSTALLER_END_ADDRESS = 0x80003000;
// return true if a code exists
bool GeckoCode::Exist(u32 address, u32 data)
bool GeckoCode::Exist(u32 address, u32 data) const
{
for (const GeckoCode::Code& code : codes)
{
+1 -1
View File
@@ -38,7 +38,7 @@ namespace Gecko
bool user_defined;
bool Compare(GeckoCode compare) const;
bool Exist(u32 address, u32 data);
bool Exist(u32 address, u32 data) const;
};
void SetActiveCodes(const std::vector<GeckoCode>& gcodes);
+1 -1
View File
@@ -49,7 +49,7 @@ void CMailHandler::Clear()
m_Mails.pop();
}
bool CMailHandler::IsEmpty()
bool CMailHandler::IsEmpty() const
{
return m_Mails.empty();
}
+2 -2
View File
@@ -19,12 +19,12 @@ public:
void Clear();
void Halt(bool _Halt);
void DoState(PointerWrap &p);
bool IsEmpty();
bool IsEmpty() const;
u16 ReadDSPMailboxHigh();
u16 ReadDSPMailboxLow();
u32 GetNextMail()
u32 GetNextMail() const
{
if (!m_Mails.empty())
{
+1 -1
View File
@@ -85,7 +85,7 @@ public:
u32 ImmRead (u32 size) override {INFO_LOG(EXPANSIONINTERFACE, "EXI DUMMY %s ImmRead", m_strName.c_str()); return 0;}
void DMAWrite(u32 addr, u32 size) override {INFO_LOG(EXPANSIONINTERFACE, "EXI DUMMY %s DMAWrite: %08x bytes, from %08x to device", m_strName.c_str(), size, addr);}
void DMARead (u32 addr, u32 size) override {INFO_LOG(EXPANSIONINTERFACE, "EXI DUMMY %s DMARead: %08x bytes, from device to %08x", m_strName.c_str(), size, addr);}
bool IsPresent() override { return true; }
bool IsPresent() const override { return true; }
};
+2 -2
View File
@@ -39,9 +39,9 @@ public:
virtual void DMAWrite(u32 _uAddr, u32 _uSize);
virtual void DMARead (u32 _uAddr, u32 _uSize);
virtual bool UseDelayedTransferCompletion() {return false;}
virtual bool UseDelayedTransferCompletion() const { return false; }
virtual bool IsPresent() {return false;}
virtual bool IsPresent() const { return false; }
virtual void SetCS(int) {}
virtual void DoState(PointerWrap&) {}
virtual void PauseAndLock(bool doLock, bool unpauseOnUnlock=true) {}
+1 -1
View File
@@ -20,7 +20,7 @@ void CEXIAD16::SetCS(int cs)
m_uPosition = 0;
}
bool CEXIAD16::IsPresent()
bool CEXIAD16::IsPresent() const
{
return true;
}
+1 -1
View File
@@ -11,7 +11,7 @@ class CEXIAD16 : public IEXIDevice
public:
CEXIAD16();
virtual void SetCS(int _iCS) override;
virtual bool IsPresent() override;
virtual bool IsPresent() const override;
virtual void DoState(PointerWrap &p) override;
private:
+1 -1
View File
@@ -15,7 +15,7 @@ class CEXIAgp
public:
CEXIAgp(const int index);
virtual ~CEXIAgp() override;
bool IsPresent() override { return true; }
bool IsPresent() const override { return true; }
void ImmWrite(u32 _uData, u32 _uSize) override;
u32 ImmRead(u32 _uSize) override;
void DoState(PointerWrap &p) override;
@@ -21,7 +21,7 @@ void CEXIAMBaseboard::SetCS(int cs)
m_position = 0;
}
bool CEXIAMBaseboard::IsPresent()
bool CEXIAMBaseboard::IsPresent() const
{
return true;
}
+1 -1
View File
@@ -12,7 +12,7 @@ public:
CEXIAMBaseboard();
virtual void SetCS(int _iCS) override;
virtual bool IsPresent() override;
virtual bool IsPresent() const override;
virtual bool IsInterruptSet() override;
virtual void DoState(PointerWrap &p) override;

Some files were not shown because too many files have changed in this diff Show More