mirror of https://github.com/AxioDL/boo.git
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> {
|
||||
NintendoPowerAState m_last;
|
||||
NintendoPowerAState m_last{};
|
||||
void deviceDisconnected() override;
|
||||
void initialCycle() 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;
|
||||
|
||||
public:
|
||||
NintendoPowerA(DeviceToken*);
|
||||
explicit NintendoPowerA(DeviceToken*);
|
||||
~NintendoPowerA() override;
|
||||
};
|
||||
} // namespace boo
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace boo {
|
|||
NintendoPowerA::NintendoPowerA(DeviceToken* token)
|
||||
: TDeviceBase<INintendoPowerACallback>(dev_typeid(NintendoPowerA), token) {}
|
||||
|
||||
NintendoPowerA::~NintendoPowerA() {}
|
||||
NintendoPowerA::~NintendoPowerA() = default;
|
||||
|
||||
void NintendoPowerA::deviceDisconnected() {
|
||||
std::lock_guard<std::mutex> lk(m_callbackLock);
|
||||
|
|
Loading…
Reference in New Issue