mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 15:50:00 -06:00
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:
14
src/NDS.h
14
src/NDS.h
@ -328,7 +328,7 @@ public:
|
||||
Firmware& GetFirmware() { return SPI.GetFirmwareMem()->GetFirmware(); }
|
||||
void SetFirmware(Firmware&& firmware) { SPI.GetFirmwareMem()->SetFirmware(std::move(firmware)); }
|
||||
|
||||
virtual bool NeedsDirectBoot();
|
||||
virtual bool NeedsDirectBoot() const;
|
||||
void SetupDirectBoot(const std::string& romname);
|
||||
virtual void SetupDirectBoot();
|
||||
|
||||
@ -364,10 +364,10 @@ public:
|
||||
|
||||
void SetKeyMask(u32 mask);
|
||||
|
||||
bool IsLidClosed();
|
||||
bool IsLidClosed() const;
|
||||
void SetLidClosed(bool closed);
|
||||
|
||||
virtual void CamInputFrame(int cam, u32* data, int width, int height, bool rgb) {}
|
||||
virtual void CamInputFrame(int cam, const u32* data, int width, int height, bool rgb) {}
|
||||
void MicInputFrame(s16* data, int samples);
|
||||
|
||||
void RegisterEventFunc(u32 id, u32 funcid, EventFunc func);
|
||||
@ -386,20 +386,20 @@ public:
|
||||
void ClearIRQ(u32 cpu, u32 irq);
|
||||
void SetIRQ2(u32 irq);
|
||||
void ClearIRQ2(u32 irq);
|
||||
bool HaltInterrupted(u32 cpu);
|
||||
bool HaltInterrupted(u32 cpu) const;
|
||||
void StopCPU(u32 cpu, u32 mask);
|
||||
void ResumeCPU(u32 cpu, u32 mask);
|
||||
void GXFIFOStall();
|
||||
void GXFIFOUnstall();
|
||||
|
||||
u32 GetPC(u32 cpu);
|
||||
u32 GetPC(u32 cpu) const;
|
||||
u64 GetSysClockCycles(int num);
|
||||
void NocashPrint(u32 cpu, u32 addr);
|
||||
|
||||
void MonitorARM9Jump(u32 addr);
|
||||
|
||||
virtual bool DMAsInMode(u32 cpu, u32 mode);
|
||||
virtual bool DMAsRunning(u32 cpu);
|
||||
virtual bool DMAsInMode(u32 cpu, u32 mode) const;
|
||||
virtual bool DMAsRunning(u32 cpu) const;
|
||||
virtual void CheckDMAs(u32 cpu, u32 mode);
|
||||
virtual void StopDMAs(u32 cpu, u32 mode);
|
||||
|
||||
|
Reference in New Issue
Block a user