Device: Don't try to deduce lock_guard template parameters
This improves compatibility with older C++ standardsv0.3.0-dev
parent
4fd65d85c8
commit
44e48182bf
|
|
@ -254,7 +254,7 @@ bool Device::open(OpenFlags flags, OpenStatusHandler handler) {
|
||||||
// otherwise quiet stream. This lock makes sure suppressDisconnects() will
|
// otherwise quiet stream. This lock makes sure suppressDisconnects() will
|
||||||
// block until we've either gotten our status update or disconnected from
|
// block until we've either gotten our status update or disconnected from
|
||||||
// the device.
|
// the device.
|
||||||
std::lock_guard lk(heartbeatMutex);
|
std::lock_guard<std::mutex> lk(heartbeatMutex);
|
||||||
if(heartbeatSuppressed())
|
if(heartbeatSuppressed())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
@ -679,9 +679,9 @@ optional<double> Device::getAnalogIO(IO type, size_t number /* = 1 */) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Lifetime Device::suppressDisconnects() {
|
Lifetime Device::suppressDisconnects() {
|
||||||
std::lock_guard lk(heartbeatMutex);
|
std::lock_guard<std::mutex> lk(heartbeatMutex);
|
||||||
heartbeatSuppressedByUser++;
|
heartbeatSuppressedByUser++;
|
||||||
return Lifetime([this] { std::lock_guard lk2(heartbeatMutex); heartbeatSuppressedByUser--; });
|
return Lifetime([this] { std::lock_guard<std::mutex> lk2(heartbeatMutex); heartbeatSuppressedByUser--; });
|
||||||
}
|
}
|
||||||
|
|
||||||
void Device::addExtension(std::shared_ptr<DeviceExtension>&& extension) {
|
void Device::addExtension(std::shared_ptr<DeviceExtension>&& extension) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue