mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-14 07:36:26 +00:00
General: Make member functions const where applicable
These functions don't modify instance state, so they can be marked const.
This commit is contained in:
@@ -33,12 +33,10 @@ void NintendoPowerA::finalCycle() {}
|
||||
|
||||
void NintendoPowerA::receivedHIDReport(const uint8_t* data, size_t length, HIDReportType tp, uint32_t message) {}
|
||||
|
||||
bool NintendoPowerAState::operator==(const NintendoPowerAState& other) {
|
||||
return !memcmp(this, &other, sizeof(NintendoPowerAState));
|
||||
bool NintendoPowerAState::operator==(const NintendoPowerAState& other) const {
|
||||
return memcmp(this, &other, sizeof(NintendoPowerAState)) == 0;
|
||||
}
|
||||
|
||||
bool NintendoPowerAState::operator!=(const NintendoPowerAState& other) {
|
||||
return memcmp(this, &other, sizeof(NintendoPowerAState));
|
||||
}
|
||||
bool NintendoPowerAState::operator!=(const NintendoPowerAState& other) const { return !operator==(other); }
|
||||
|
||||
} // namespace boo
|
||||
|
||||
Reference in New Issue
Block a user