diff --git a/Source/Core/Common/BreakPoints.cpp b/Source/Core/Common/BreakPoints.cpp index bd2355ed4b..74dcb45030 100644 --- a/Source/Core/Common/BreakPoints.cpp +++ b/Source/Core/Common/BreakPoints.cpp @@ -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; diff --git a/Source/Core/Common/BreakPoints.h b/Source/Core/Common/BreakPoints.h index 79b17e11ea..631284bc03 100644 --- a/Source/Core/Common/BreakPoints.h +++ b/Source/Core/Common/BreakPoints.h @@ -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); diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 6779e62937..bb4ab0ca76 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -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); diff --git a/Source/Core/Common/FileUtil.h b/Source/Core/Common/FileUtil.h index 6548a95fcb..4ff158462d 100644 --- a/Source/Core/Common/FileUtil.h +++ b/Source/Core/Common/FileUtil.h @@ -203,10 +203,10 @@ public: return WriteArray(reinterpret_cast(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(); diff --git a/Source/Core/Common/Logging/LogManager.h b/Source/Core/Common/Logging/LogManager.h index 1d3f30df33..67f964e091 100644 --- a/Source/Core/Common/Logging/LogManager.h +++ b/Source/Core/Common/Logging/LogManager.h @@ -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; } diff --git a/Source/Core/Core/Boot/Boot_DOL.h b/Source/Core/Core/Boot/Boot_DOL.h index 535c651c47..60f1b8d46f 100644 --- a/Source/Core/Core/Boot/Boot_DOL.h +++ b/Source/Core/Core/Boot/Boot_DOL.h @@ -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(); diff --git a/Source/Core/Core/Boot/ElfReader.h b/Source/Core/Core/Boot/ElfReader.h index d4920eb513..fa8be27890 100644 --- a/Source/Core/Core/Boot/ElfReader.h +++ b/Source/Core/Core/Boot/ElfReader.h @@ -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; } diff --git a/Source/Core/Core/FifoPlayer/FifoDataFile.h b/Source/Core/Core/FifoPlayer/FifoDataFile.h index 65dffc637a..b3a5e00d9f 100644 --- a/Source/Core/Core/FifoPlayer/FifoDataFile.h +++ b/Source/Core/Core/FifoPlayer/FifoDataFile.h @@ -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(m_Frames.size()); } + u32 GetFrameCount() const { return static_cast(m_Frames.size()); } bool Save(const std::string& filename); diff --git a/Source/Core/Core/FifoPlayer/FifoRecorder.h b/Source/Core/Core/FifoPlayer/FifoRecorder.h index 51c37843c7..590815dd1d 100644 --- a/Source/Core/Core/FifoPlayer/FifoRecorder.h +++ b/Source/Core/Core/FifoPlayer/FifoRecorder.h @@ -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(); diff --git a/Source/Core/Core/GeckoCode.cpp b/Source/Core/Core/GeckoCode.cpp index 9fd347050c..d05c1cba67 100644 --- a/Source/Core/Core/GeckoCode.cpp +++ b/Source/Core/Core/GeckoCode.cpp @@ -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) { diff --git a/Source/Core/Core/GeckoCode.h b/Source/Core/Core/GeckoCode.h index dc1947ac66..89902ef186 100644 --- a/Source/Core/Core/GeckoCode.h +++ b/Source/Core/Core/GeckoCode.h @@ -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& gcodes); diff --git a/Source/Core/Core/HW/DSPHLE/MailHandler.cpp b/Source/Core/Core/HW/DSPHLE/MailHandler.cpp index b2a987440d..0be2df8bbe 100644 --- a/Source/Core/Core/HW/DSPHLE/MailHandler.cpp +++ b/Source/Core/Core/HW/DSPHLE/MailHandler.cpp @@ -49,7 +49,7 @@ void CMailHandler::Clear() m_Mails.pop(); } -bool CMailHandler::IsEmpty() +bool CMailHandler::IsEmpty() const { return m_Mails.empty(); } diff --git a/Source/Core/Core/HW/DSPHLE/MailHandler.h b/Source/Core/Core/HW/DSPHLE/MailHandler.h index b125acdf1b..fa5b8d48af 100644 --- a/Source/Core/Core/HW/DSPHLE/MailHandler.h +++ b/Source/Core/Core/HW/DSPHLE/MailHandler.h @@ -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()) { diff --git a/Source/Core/Core/HW/EXI_Device.cpp b/Source/Core/Core/HW/EXI_Device.cpp index c8bb9038cf..bfd5f1ba11 100644 --- a/Source/Core/Core/HW/EXI_Device.cpp +++ b/Source/Core/Core/HW/EXI_Device.cpp @@ -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; } }; diff --git a/Source/Core/Core/HW/EXI_Device.h b/Source/Core/Core/HW/EXI_Device.h index faea05dd42..e22aac9f90 100644 --- a/Source/Core/Core/HW/EXI_Device.h +++ b/Source/Core/Core/HW/EXI_Device.h @@ -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) {} diff --git a/Source/Core/Core/HW/EXI_DeviceAD16.cpp b/Source/Core/Core/HW/EXI_DeviceAD16.cpp index 1f4e33eeab..ef26d99a30 100644 --- a/Source/Core/Core/HW/EXI_DeviceAD16.cpp +++ b/Source/Core/Core/HW/EXI_DeviceAD16.cpp @@ -20,7 +20,7 @@ void CEXIAD16::SetCS(int cs) m_uPosition = 0; } -bool CEXIAD16::IsPresent() +bool CEXIAD16::IsPresent() const { return true; } diff --git a/Source/Core/Core/HW/EXI_DeviceAD16.h b/Source/Core/Core/HW/EXI_DeviceAD16.h index d4b722db6f..e1e31c5978 100644 --- a/Source/Core/Core/HW/EXI_DeviceAD16.h +++ b/Source/Core/Core/HW/EXI_DeviceAD16.h @@ -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: diff --git a/Source/Core/Core/HW/EXI_DeviceAGP.h b/Source/Core/Core/HW/EXI_DeviceAGP.h index 6ecf30c669..3f4b6913c7 100644 --- a/Source/Core/Core/HW/EXI_DeviceAGP.h +++ b/Source/Core/Core/HW/EXI_DeviceAGP.h @@ -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; diff --git a/Source/Core/Core/HW/EXI_DeviceAMBaseboard.cpp b/Source/Core/Core/HW/EXI_DeviceAMBaseboard.cpp index 477c32bd2e..c46c3b9079 100644 --- a/Source/Core/Core/HW/EXI_DeviceAMBaseboard.cpp +++ b/Source/Core/Core/HW/EXI_DeviceAMBaseboard.cpp @@ -21,7 +21,7 @@ void CEXIAMBaseboard::SetCS(int cs) m_position = 0; } -bool CEXIAMBaseboard::IsPresent() +bool CEXIAMBaseboard::IsPresent() const { return true; } diff --git a/Source/Core/Core/HW/EXI_DeviceAMBaseboard.h b/Source/Core/Core/HW/EXI_DeviceAMBaseboard.h index 59a99caa13..5ab2c7fe3b 100644 --- a/Source/Core/Core/HW/EXI_DeviceAMBaseboard.h +++ b/Source/Core/Core/HW/EXI_DeviceAMBaseboard.h @@ -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; diff --git a/Source/Core/Core/HW/EXI_DeviceEthernet.cpp b/Source/Core/Core/HW/EXI_DeviceEthernet.cpp index 04ce72d8af..a47b4ee616 100644 --- a/Source/Core/Core/HW/EXI_DeviceEthernet.cpp +++ b/Source/Core/Core/HW/EXI_DeviceEthernet.cpp @@ -68,7 +68,7 @@ void CEXIETHERNET::SetCS(int cs) } } -bool CEXIETHERNET::IsPresent() +bool CEXIETHERNET::IsPresent() const { return true; } diff --git a/Source/Core/Core/HW/EXI_DeviceEthernet.h b/Source/Core/Core/HW/EXI_DeviceEthernet.h index 4d1f0dfb00..bd060f1434 100644 --- a/Source/Core/Core/HW/EXI_DeviceEthernet.h +++ b/Source/Core/Core/HW/EXI_DeviceEthernet.h @@ -193,7 +193,7 @@ public: CEXIETHERNET(); virtual ~CEXIETHERNET(); void SetCS(int cs) override; - bool IsPresent() override; + bool IsPresent() const override; bool IsInterruptSet() override; void ImmWrite(u32 data, u32 size) override; u32 ImmRead(u32 size) override; diff --git a/Source/Core/Core/HW/EXI_DeviceGecko.h b/Source/Core/Core/HW/EXI_DeviceGecko.h index a0f2caea63..e78da26499 100644 --- a/Source/Core/Core/HW/EXI_DeviceGecko.h +++ b/Source/Core/Core/HW/EXI_DeviceGecko.h @@ -49,7 +49,7 @@ class CEXIGecko { public: CEXIGecko() {} - bool IsPresent() override { return true; } + bool IsPresent() const override { return true; } void ImmReadWrite(u32 &_uData, u32 _uSize) override; private: diff --git a/Source/Core/Core/HW/EXI_DeviceIPL.cpp b/Source/Core/Core/HW/EXI_DeviceIPL.cpp index fbb89a20b7..9a5dac25cb 100644 --- a/Source/Core/Core/HW/EXI_DeviceIPL.cpp +++ b/Source/Core/Core/HW/EXI_DeviceIPL.cpp @@ -160,7 +160,7 @@ void CEXIIPL::SetCS(int _iCS) } } -bool CEXIIPL::IsPresent() +bool CEXIIPL::IsPresent() const { return true; } diff --git a/Source/Core/Core/HW/EXI_DeviceIPL.h b/Source/Core/Core/HW/EXI_DeviceIPL.h index cb8097ea59..9e44a7b47c 100644 --- a/Source/Core/Core/HW/EXI_DeviceIPL.h +++ b/Source/Core/Core/HW/EXI_DeviceIPL.h @@ -16,7 +16,7 @@ public: virtual ~CEXIIPL(); virtual void SetCS(int _iCS) override; - bool IsPresent() override; + bool IsPresent() const override; void DoState(PointerWrap &p) override; static u32 GetGCTime(); diff --git a/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp b/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp index b9022556c3..a0f622a610 100644 --- a/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp +++ b/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp @@ -246,12 +246,12 @@ CEXIMemoryCard::~CEXIMemoryCard() CoreTiming::RemoveEvent(et_transfer_complete); } -bool CEXIMemoryCard::UseDelayedTransferCompletion() +bool CEXIMemoryCard::UseDelayedTransferCompletion() const { return true; } -bool CEXIMemoryCard::IsPresent() +bool CEXIMemoryCard::IsPresent() const { return true; } diff --git a/Source/Core/Core/HW/EXI_DeviceMemoryCard.h b/Source/Core/Core/HW/EXI_DeviceMemoryCard.h index 7003652e30..e3d381f10a 100644 --- a/Source/Core/Core/HW/EXI_DeviceMemoryCard.h +++ b/Source/Core/Core/HW/EXI_DeviceMemoryCard.h @@ -14,8 +14,8 @@ public: virtual ~CEXIMemoryCard(); void SetCS(int cs) override; bool IsInterruptSet() override; - bool UseDelayedTransferCompletion() override; - bool IsPresent() override; + bool UseDelayedTransferCompletion() const override; + bool IsPresent() const override; void DoState(PointerWrap &p) override; IEXIDevice* FindDevice(TEXIDevices device_type, int customIndex = -1) override; void DMARead(u32 _uAddr, u32 _uSize) override; diff --git a/Source/Core/Core/HW/EXI_DeviceMic.cpp b/Source/Core/Core/HW/EXI_DeviceMic.cpp index 540b15f488..b572957920 100644 --- a/Source/Core/Core/HW/EXI_DeviceMic.cpp +++ b/Source/Core/Core/HW/EXI_DeviceMic.cpp @@ -162,7 +162,7 @@ CEXIMic::~CEXIMic() StreamTerminate(); } -bool CEXIMic::IsPresent() +bool CEXIMic::IsPresent() const { return true; } diff --git a/Source/Core/Core/HW/EXI_DeviceMic.h b/Source/Core/Core/HW/EXI_DeviceMic.h index 154016a6fe..bd2e0eba2c 100644 --- a/Source/Core/Core/HW/EXI_DeviceMic.h +++ b/Source/Core/Core/HW/EXI_DeviceMic.h @@ -17,7 +17,7 @@ public: virtual ~CEXIMic(); void SetCS(int cs) override; bool IsInterruptSet() override; - bool IsPresent() override; + bool IsPresent() const override; private: static u8 const exi_id[]; diff --git a/Source/Core/Core/HW/GCMemcard.h b/Source/Core/Core/HW/GCMemcard.h index 459efd937b..b44ff7e1fc 100644 --- a/Source/Core/Core/HW/GCMemcard.h +++ b/Source/Core/Core/HW/GCMemcard.h @@ -75,7 +75,7 @@ public: virtual void ClearBlock(u32 address) = 0; virtual void ClearAll() = 0; virtual void DoState(PointerWrap &p) = 0; - u32 GetCardId() { return nintendo_card_id; } + u32 GetCardId() const { return nintendo_card_id; } bool IsAddressInBounds(u32 address) const { return address <= (memory_card_size - 1); @@ -302,11 +302,11 @@ class GCIFile { public: bool LoadSaveBlocks(); - bool HasCopyProtection() + bool HasCopyProtection() const { - if ((strcmp((char *)m_gci_header.Filename, "PSO_SYSTEM") == 0) || - (strcmp((char *)m_gci_header.Filename, "PSO3_SYSTEM") == 0) || - (strcmp((char *)m_gci_header.Filename, "f_zero.dat") == 0)) + if ((strcmp((char*)m_gci_header.Filename, "PSO_SYSTEM") == 0) || + (strcmp((char*)m_gci_header.Filename, "PSO3_SYSTEM") == 0) || + (strcmp((char*)m_gci_header.Filename, "f_zero.dat") == 0)) return true; return false; } diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.cpp index f03a44240c..f3093a3c8b 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.cpp @@ -208,7 +208,7 @@ IPCCommandResult CWII_IPC_HLE_Device_net_kd_request::IOCtl(u32 _CommandAddress) } -u8 CWII_IPC_HLE_Device_net_kd_request::GetAreaCode(const std::string& area) +u8 CWII_IPC_HLE_Device_net_kd_request::GetAreaCode(const std::string& area) const { static std::map regions = { { "JPN", 0 }, { "USA", 1 }, { "EUR", 2 }, @@ -225,7 +225,7 @@ u8 CWII_IPC_HLE_Device_net_kd_request::GetAreaCode(const std::string& area) return 7; // Unknown } -u8 CWII_IPC_HLE_Device_net_kd_request::GetHardwareModel(const std::string& model) +u8 CWII_IPC_HLE_Device_net_kd_request::GetHardwareModel(const std::string& model) const { static std::map models = { { "RVL", MODEL_RVL }, diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.h index fd6b7e07f1..d2972fac5a 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.h +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.h @@ -275,14 +275,14 @@ public: return 0; } - u32 Magic() {return Common::swap32(config.magic);} - void SetMagic(u32 magic) {config.magic = Common::swap32(magic);} + u32 Magic() const { return Common::swap32(config.magic); } + void SetMagic(u32 magic) { config.magic = Common::swap32(magic); } - u32 Unk() {return Common::swap32(config._unk_04);} - void SetUnk(u32 _unk_04) {config._unk_04 = Common::swap32(_unk_04);} + u32 Unk() const { return Common::swap32(config._unk_04); } + void SetUnk(u32 _unk_04) { config._unk_04 = Common::swap32(_unk_04); } - u32 IdGen() {return Common::swap32(config.id_generation);} - void SetIdGen(u32 id_generation) {config.id_generation = Common::swap32(id_generation);} + u32 IdGen() const { return Common::swap32(config.id_generation); } + void SetIdGen(u32 id_generation) { config.id_generation = Common::swap32(id_generation); } void IncrementIdGen() { @@ -292,19 +292,19 @@ public: SetIdGen(id_ctr); } - u32 Checksum() {return Common::swap32(config.checksum);} - void SetChecksum(u32 checksum) {config.checksum = Common::swap32(checksum);} + u32 Checksum() const { return Common::swap32(config.checksum); } + void SetChecksum(u32 checksum) { config.checksum = Common::swap32(checksum); } - u32 CreationStage() {return Common::swap32(config.creation_stage);} - void SetCreationStage(u32 creation_stage) {config.creation_stage = Common::swap32(creation_stage);} + u32 CreationStage() const { return Common::swap32(config.creation_stage); } + void SetCreationStage(u32 creation_stage) { config.creation_stage = Common::swap32(creation_stage); } - u32 EnableBooting() {return Common::swap32(config.enable_booting);} - void SetEnableBooting(u32 enable_booting) {config.enable_booting = Common::swap32(enable_booting);} + u32 EnableBooting() const { return Common::swap32(config.enable_booting); } + void SetEnableBooting(u32 enable_booting) { config.enable_booting = Common::swap32(enable_booting); } - u64 Id() {return Common::swap64(config.nwc24_id);} - void SetId(u64 nwc24_id) {config.nwc24_id = Common::swap64(nwc24_id);} + u64 Id() const { return Common::swap64(config.nwc24_id); } + void SetId(u64 nwc24_id) { config.nwc24_id = Common::swap64(nwc24_id); } - const char* Email() {return config.email;} + const char* Email() const { return config.email; } void SetEmail(const char* email) { strncpy(config.email, email, nwc24_config_t::MAX_EMAIL_LENGTH); @@ -431,8 +431,8 @@ private: MODEL_ELSE = 7 }; - u8 GetAreaCode(const std::string& area); - u8 GetHardwareModel(const std::string& model); + u8 GetAreaCode(const std::string& area) const; + u8 GetHardwareModel(const std::string& model) const; s32 NWC24MakeUserID(u64* nwc24_id, u32 hollywood_id, u16 id_ctr, u8 hardware_model, u8 area_code); diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.cpp index 81c3d40d74..50eac99de4 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.cpp @@ -40,7 +40,7 @@ CWII_IPC_HLE_Device_net_ssl::~CWII_IPC_HLE_Device_net_ssl() } } -int CWII_IPC_HLE_Device_net_ssl::getSSLFreeID() +int CWII_IPC_HLE_Device_net_ssl::GetSSLFreeID() const { for (int i = 0; i < NET_SSL_MAXINSTANCES; i++) { @@ -134,7 +134,7 @@ IPCCommandResult CWII_IPC_HLE_Device_net_ssl::IOCtlV(u32 _CommandAddress) int verifyOption = Memory::Read_U32(BufferOut); std::string hostname = Memory::GetString(BufferOut2, BufferOutSize2); - int freeSSL = this->getSSLFreeID(); + int freeSSL = GetSSLFreeID(); if (freeSSL) { int sslID = freeSSL - 1; diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h index 3cf12810b9..acce2a47a4 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h @@ -81,7 +81,7 @@ public: virtual IPCCommandResult IOCtl(u32 _CommandAddress) override; virtual IPCCommandResult IOCtlV(u32 _CommandAddress) override; - int getSSLFreeID(); + int GetSSLFreeID() const; static WII_SSL _SSL[NET_SSL_MAXINSTANCES]; }; diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.h index fd8a98accc..e03951bbbd 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.h +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.h @@ -21,9 +21,9 @@ class CBigEndianBuffer public: CBigEndianBuffer(u8* pBuffer) : m_pBuffer(pBuffer) {} - u8 Read8(u32 offset) { return m_pBuffer[offset]; } - u16 Read16(u32 offset) { return Common::swap16(*(u16*)&m_pBuffer[offset]); } - u32 Read32(u32 offset) { return Common::swap32(*(u32*)&m_pBuffer[offset]); } + u8 Read8(u32 offset) const { return m_pBuffer[offset]; } + u16 Read16(u32 offset) const { return Common::swap16(*(u16*)&m_pBuffer[offset]); } + u32 Read32(u32 offset) const { return Common::swap32(*(u32*)&m_pBuffer[offset]); } void Write8(u32 offset, u8 data) { m_pBuffer[offset] = data; } void Write16(u32 offset, u16 data) { *(u16*)&m_pBuffer[offset] = Common::swap16(data); } diff --git a/Source/Core/Core/IPC_HLE/WII_Socket.h b/Source/Core/Core/IPC_HLE/WII_Socket.h index 2f1c93a3dc..4956c4dd24 100644 --- a/Source/Core/Core/IPC_HLE/WII_Socket.h +++ b/Source/Core/Core/IPC_HLE/WII_Socket.h @@ -189,7 +189,7 @@ private: void DoSock(u32 _CommandAddress, NET_IOCTL type); void DoSock(u32 _CommandAddress, SSL_IOCTL type); void Update(bool read, bool write, bool except); - bool IsValid() { return fd >= 0; } + bool IsValid() const { return fd >= 0; } public: WiiSocket() : fd(-1), nonBlock(false) {} ~WiiSocket(); @@ -216,7 +216,7 @@ public: s32 NewSocket(s32 af, s32 type, s32 protocol); void AddSocket(s32 fd); s32 DeleteSocket(s32 s); - s32 GetLastNetError() { return errno_last; } + s32 GetLastNetError() const { return errno_last; } void SetLastNetError(s32 error) { errno_last = error; } void Clean() diff --git a/Source/Core/VideoBackends/D3D/D3DBlob.cpp b/Source/Core/VideoBackends/D3D/D3DBlob.cpp index a4ed6c4683..5f70ceb4b8 100644 --- a/Source/Core/VideoBackends/D3D/D3DBlob.cpp +++ b/Source/Core/VideoBackends/D3D/D3DBlob.cpp @@ -44,7 +44,7 @@ unsigned int D3DBlob::Release() return ref; } -unsigned int D3DBlob::Size() +unsigned int D3DBlob::Size() const { return size; } diff --git a/Source/Core/VideoBackends/D3D/D3DBlob.h b/Source/Core/VideoBackends/D3D/D3DBlob.h index 5f228147d2..bacf98d983 100644 --- a/Source/Core/VideoBackends/D3D/D3DBlob.h +++ b/Source/Core/VideoBackends/D3D/D3DBlob.h @@ -24,7 +24,7 @@ public: void AddRef(); unsigned int Release(); - unsigned int Size(); + unsigned int Size() const; u8* Data(); private: diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index b76883173b..0006ff9266 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -95,7 +95,7 @@ public: bool OverlapsMemoryRange(u32 range_address, u32 range_size) const; - bool IsEfbCopy() { return is_efb_copy; } + bool IsEfbCopy() const { return is_efb_copy; } }; virtual ~TextureCache(); // needs virtual for DX11 dtor