Sprinkle const around where appropriate (#1909)

* Sprinkle `const` around where appropriate

- This will make it easier to use `NDS` objects in `const` contexts (e.g. `const` parameters or methods)

* Remove the `const` qualifier on `DSi_DSP::DSPRead16`

- MMIO reads can be non-pure, so this may not be `const` in the future
This commit is contained in:
Jesse Talavera
2023-12-12 05:07:22 -05:00
committed by GitHub
parent 2cba2e783a
commit 9bfc9c08ff
57 changed files with 253 additions and 243 deletions

View File

@ -169,8 +169,8 @@ public:
u16 Read(u32 addr);
void Write(u32 addr, u16 val);
u8* GetMAC();
u8* GetBSSID();
const u8* GetMAC() const;
const u8* GetBSSID() const;
private:
melonDS::NDS& NDS;
@ -261,12 +261,12 @@ private:
void SetStatus(u32 status);
void PowerDown();
int PreambleLen(int rate);
u32 NumClients(u16 bitmask);
void IncrementTXCount(TXSlot* slot);
int PreambleLen(int rate) const;
u32 NumClients(u16 bitmask) const;
void IncrementTXCount(const TXSlot* slot);
void ReportMPReplyErrors(u16 clientfail);
void TXSendFrame(TXSlot* slot, int num);
void TXSendFrame(const TXSlot* slot, int num);
void StartTX_LocN(int nslot, int loc);
void StartTX_Cmd();
void StartTX_Beacon();