From 44e48182bf5de52f67839c13b20ab72e9683fa39 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Mon, 14 Feb 2022 19:32:12 -0500 Subject: [PATCH] Device: Don't try to deduce lock_guard template parameters This improves compatibility with older C++ standards --- device/device.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/device/device.cpp b/device/device.cpp index ee16c3a..207551d 100644 --- a/device/device.cpp +++ b/device/device.cpp @@ -254,7 +254,7 @@ bool Device::open(OpenFlags flags, OpenStatusHandler handler) { // otherwise quiet stream. This lock makes sure suppressDisconnects() will // block until we've either gotten our status update or disconnected from // the device. - std::lock_guard lk(heartbeatMutex); + std::lock_guard lk(heartbeatMutex); if(heartbeatSuppressed()) continue; @@ -679,9 +679,9 @@ optional Device::getAnalogIO(IO type, size_t number /* = 1 */) { } Lifetime Device::suppressDisconnects() { - std::lock_guard lk(heartbeatMutex); + std::lock_guard lk(heartbeatMutex); heartbeatSuppressedByUser++; - return Lifetime([this] { std::lock_guard lk2(heartbeatMutex); heartbeatSuppressedByUser--; }); + return Lifetime([this] { std::lock_guard lk2(heartbeatMutex); heartbeatSuppressedByUser--; }); } void Device::addExtension(std::shared_ptr&& extension) {