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:
Lioncash 2019-09-06 07:23:34 -04:00
parent 9b8ef4695f
commit 7496109ff6
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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);