X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=pv%2Fdevicemanager.cpp;h=9e3944b5974e4ce5fa1dbd9c2d268c1ebb1e72bd;hb=39ab01e794a0c13cfc012e90dd17eaebc234fb38;hp=f1f4c542ca227bca236f050f9e226f30c7271422;hpb=e71eb81c946c3524e01eaef9781ccbf170143d0c;p=pulseview.git
diff --git a/pv/devicemanager.cpp b/pv/devicemanager.cpp
index f1f4c542..9e3944b5 100644
--- a/pv/devicemanager.cpp
+++ b/pv/devicemanager.cpp
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
#include "devicemanager.hpp"
@@ -65,10 +64,6 @@ DeviceManager::DeviceManager(shared_ptr context) :
driver_scan(entry.second, map());
}
-DeviceManager::~DeviceManager()
-{
-}
-
const std::shared_ptr& DeviceManager::context() const
{
return context_;
@@ -151,10 +146,12 @@ const shared_ptr DeviceManager::find_device_from_info(
// If present, vendor and model always have to match.
if (dev_info.count("vendor") > 0 && search_info.count("vendor") > 0)
- if (dev_info.at("vendor") != search_info.at("vendor")) continue;
+ if (dev_info.at("vendor") != search_info.at("vendor"))
+ continue;
if (dev_info.count("model") > 0 && search_info.count("model") > 0)
- if (dev_info.at("model") != search_info.at("model")) continue;
+ if (dev_info.at("model") != search_info.at("model"))
+ continue;
// Most unique match: vendor/model/serial_num (but don't match a S/N of 0)
if ((dev_info.count("serial_num") > 0) && (dev_info.at("serial_num") != "0")
@@ -189,7 +186,8 @@ const shared_ptr DeviceManager::find_device_from_info(
}
bool DeviceManager::compare_devices(shared_ptr a,
- shared_ptr b) {
+ shared_ptr b)
+{
assert(a);
assert(b);
return a->display_name(*this).compare(b->display_name(*this)) < 0;