]> sigrok.org Git - pulseview.git/commitdiff
Fix device removal in DeviceManager::driver_scan()
authorSoeren Apel <redacted>
Fri, 7 Nov 2014 14:52:59 +0000 (15:52 +0100)
committerBert Vermeulen <redacted>
Sun, 9 Nov 2014 13:15:58 +0000 (14:15 +0100)
pv/devicemanager.cpp

index c06fd79f3b77891a8605a57c386bb68f806004cc..4c9f768a909a07e1585c84d9c0785c2c7b92d6e8 100644 (file)
@@ -82,9 +82,8 @@ list< shared_ptr<HardwareDevice> > DeviceManager::driver_scan(
 
        // Remove any device instances from this driver from the device
        // list. They will not be valid after the scan.
-       remove_if(_devices.begin(), _devices.end(),
-               [&](shared_ptr<HardwareDevice> device) {
-                       return device->driver() == driver; });
+       _devices.remove_if([&](shared_ptr<HardwareDevice> device) {
+               return device->driver() == driver; });
 
        // Do the scan
        auto devices = driver->scan(drvopts);