WiimoteScannerDarwin: Fix lint

This commit is contained in:
OatmealDome 2021-06-24 17:59:58 -04:00
parent b494d109d4
commit 156ffef98c
5 changed files with 14 additions and 13 deletions

View File

@ -46,8 +46,8 @@ public:
~WiimoteScannerLinux() override;
bool IsReady() const override;
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override;
void Update() override {} // not needed on Linux
void RequestStopSearching() override {} // not needed on Linux
void Update() override {} // not needed on Linux
void RequestStopSearching() override {} // not needed on Linux
private:
int m_device_id;
int m_device_sock;

View File

@ -25,6 +25,7 @@ public:
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override;
void Update() override {} // not needed
void RequestStopSearching() override { m_stop_scanning = true; }
private:
IOBluetoothHostController* m_host_controller;
bool m_stop_scanning = false;

View File

@ -27,13 +27,13 @@ WiimoteScannerDarwin::WiimoteScannerDarwin()
if (![m_host_controller addressAsString])
{
WARN_LOG_FMT(WIIMOTE, "No Bluetooth host controller");
[m_host_controller release];
m_host_controller = nil;
return;
}
[m_host_controller retain];
}
@ -41,7 +41,7 @@ WiimoteScannerDarwin::~WiimoteScannerDarwin()
{
[m_host_controller release];
m_host_controller = nil;
m_stop_scanning = true;
}
@ -52,7 +52,7 @@ void WiimoteScannerDarwin::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
{
return;
}
IOBluetoothDeviceInquiry* bti;
found_board = nullptr;
@ -66,7 +66,7 @@ void WiimoteScannerDarwin::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
{
ERROR_LOG_FMT(WIIMOTE, "Unable to do Bluetooth discovery");
[sbt release];
return;
}
@ -98,7 +98,7 @@ void WiimoteScannerDarwin::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
found_wiimotes.push_back(wm);
}
}
[bti release];
[sbt release];
}

View File

@ -38,8 +38,8 @@ public:
~WiimoteScannerHidapi();
bool IsReady() const override;
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override;
void Update() override {} // not needed for hidapi
void RequestStopSearching() override {} // not needed for hidapi
void Update() override {} // not needed for hidapi
void RequestStopSearching() override {} // not needed for hidapi
};
} // namespace WiimoteReal

View File

@ -545,12 +545,12 @@ void WiimoteScanner::StopThread()
if (m_scan_thread_running.TestAndClear())
{
SetScanMode(WiimoteScanMode::DO_NOT_SCAN);
for (const auto& backend : m_backends)
{
backend->RequestStopSearching();
}
m_scan_thread.join();
}
}