Browse Source

PlutoSDR support: appply Sonar suggestion but for C++17

chirpmodem-v8.0.0
f4exb 7 months ago
parent
commit
d82c1172cd
  1. 6
      devices/plutosdr/deviceplutosdrscan.cpp

6
devices/plutosdr/deviceplutosdrscan.cpp

@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
#include <cstring>
#include <regex>
#include <memory>
#include <string_view>
#include <iio.h>
#include <QtGlobal>
@ -65,7 +66,10 @@ void DevicePlutoSDRScan::scan() @@ -65,7 +66,10 @@ void DevicePlutoSDRScan::scan()
}
qDebug("PlutoSDRScan::scan: %d: %s [%s]", i, description, uri);
const bool isPlutoDescription = strstr(description, "PlutoSDR") || strstr(description, "AD93");
const std::string_view descriptionView = description ? std::string_view{description} : std::string_view{};
const bool isPlutoDescription =
(descriptionView.find("PlutoSDR") != std::string_view::npos) ||
(descriptionView.find("AD93") != std::string_view::npos);
if (isPlutoDescription)
{

Loading…
Cancel
Save