mirror of
https://github.com/AxioDL/boo.git
synced 2025-07-06 13:15:58 +00:00
NintendoPowerA: Make constructor explicit
While we're at it we can also ensure that all class members have deterministic initial state.
This commit is contained in:
parent
9b8ef4695f
commit
7496109ff6
@ -34,7 +34,7 @@ struct INintendoPowerACallback {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class NintendoPowerA final : public TDeviceBase<INintendoPowerACallback> {
|
class NintendoPowerA final : public TDeviceBase<INintendoPowerACallback> {
|
||||||
NintendoPowerAState m_last;
|
NintendoPowerAState m_last{};
|
||||||
void deviceDisconnected() override;
|
void deviceDisconnected() override;
|
||||||
void initialCycle() override;
|
void initialCycle() override;
|
||||||
void transferCycle() override;
|
void transferCycle() override;
|
||||||
@ -42,7 +42,7 @@ class NintendoPowerA final : public TDeviceBase<INintendoPowerACallback> {
|
|||||||
void receivedHIDReport(const uint8_t* data, size_t length, HIDReportType tp, uint32_t message) override;
|
void receivedHIDReport(const uint8_t* data, size_t length, HIDReportType tp, uint32_t message) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NintendoPowerA(DeviceToken*);
|
explicit NintendoPowerA(DeviceToken*);
|
||||||
~NintendoPowerA() override;
|
~NintendoPowerA() override;
|
||||||
};
|
};
|
||||||
} // namespace boo
|
} // namespace boo
|
||||||
|
@ -8,7 +8,7 @@ namespace boo {
|
|||||||
NintendoPowerA::NintendoPowerA(DeviceToken* token)
|
NintendoPowerA::NintendoPowerA(DeviceToken* token)
|
||||||
: TDeviceBase<INintendoPowerACallback>(dev_typeid(NintendoPowerA), token) {}
|
: TDeviceBase<INintendoPowerACallback>(dev_typeid(NintendoPowerA), token) {}
|
||||||
|
|
||||||
NintendoPowerA::~NintendoPowerA() {}
|
NintendoPowerA::~NintendoPowerA() = default;
|
||||||
|
|
||||||
void NintendoPowerA::deviceDisconnected() {
|
void NintendoPowerA::deviceDisconnected() {
|
||||||
std::lock_guard<std::mutex> lk(m_callbackLock);
|
std::lock_guard<std::mutex> lk(m_callbackLock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user