From: Soeren Apel Date: Fri, 7 Nov 2014 14:52:59 +0000 (+0100) Subject: Fix device removal in DeviceManager::driver_scan() X-Git-Tag: pulseview-0.3.0~522 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=cbe9f991ccfc62182cddb758c69bc5d90f30302f;p=pulseview.git Fix device removal in DeviceManager::driver_scan() --- diff --git a/pv/devicemanager.cpp b/pv/devicemanager.cpp index c06fd79f..4c9f768a 100644 --- a/pv/devicemanager.cpp +++ b/pv/devicemanager.cpp @@ -82,9 +82,8 @@ list< shared_ptr > 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 device) { - return device->driver() == driver; }); + _devices.remove_if([&](shared_ptr device) { + return device->driver() == driver; }); // Do the scan auto devices = driver->scan(drvopts);