Browse Source

devices/usrp: Move properties into tick-rate restore guard

Use std::move when initializing the restoreAutoTickRate guard to
avoid an unnecessary copy of properties. Include utility explicitly
for std::move and make ownership transfer intent clear, reducing
overhead during USRP device initialization.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.0.0
Robin Getz 1 month ago
parent
commit
fb50e31395
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 3
      devices/usrp/deviceusrpparam.cpp

3
devices/usrp/deviceusrpparam.cpp

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
///////////////////////////////////////////////////////////////////////////////////
#include <functional>
#include <utility>
#include <QDebug>
#include "deviceusrpparam.h"
@ -132,7 +133,7 @@ bool DeviceUSRPParams::open(const QString &deviceStr, bool channelNumOnly) @@ -132,7 +133,7 @@ bool DeviceUSRPParams::open(const QString &deviceStr, bool channelNumOnly)
} catch (...) {
}
}
} restoreAutoTickRate{properties, autoTickRatePath};
} restoreAutoTickRate{std::move(properties), autoTickRatePath};
// Find max and min sample rate, for max and min master clock rates
m_dev->set_master_clock_rate(clockRange.start());

Loading…
Cancel
Save