mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-21 23:55:13 -05:00
Fixed range-loop-construct warnings in GCC 11
This commit is contained in:
parent
766695d99d
commit
63bea7734b
@ -794,7 +794,7 @@ void MapGUI::setBeacons(QList<Beacon *> *beacons)
|
||||
void MapGUI::addIBPBeacons()
|
||||
{
|
||||
// Add to Map
|
||||
for (const auto beacon : IBPBeacon::m_beacons)
|
||||
for (const auto& beacon : IBPBeacon::m_beacons)
|
||||
{
|
||||
SWGSDRangel::SWGMapItem beaconMapItem;
|
||||
beaconMapItem.setName(new QString(beacon.m_callsign));
|
||||
|
@ -1546,7 +1546,7 @@ void SoapySDROutput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings&
|
||||
response.getSoapySdrOutputSettings()->setTunableElements(new QList<SWGSDRangel::SWGArgValue*>);
|
||||
}
|
||||
|
||||
for (const auto itName : settings.m_tunableElements.keys())
|
||||
for (const auto& itName : settings.m_tunableElements.keys())
|
||||
{
|
||||
response.getSoapySdrOutputSettings()->getTunableElements()->append(new SWGSDRangel::SWGArgValue);
|
||||
response.getSoapySdrOutputSettings()->getTunableElements()->back()->setKey(new QString( itName));
|
||||
@ -1564,7 +1564,7 @@ void SoapySDROutput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings&
|
||||
response.getSoapySdrOutputSettings()->setIndividualGains(new QList<SWGSDRangel::SWGArgValue*>);
|
||||
}
|
||||
|
||||
for (const auto itName : settings.m_individualGains.keys())
|
||||
for (const auto& itName : settings.m_individualGains.keys())
|
||||
{
|
||||
response.getSoapySdrOutputSettings()->getIndividualGains()->append(new SWGSDRangel::SWGArgValue);
|
||||
response.getSoapySdrOutputSettings()->getIndividualGains()->back()->setKey(new QString(itName));
|
||||
@ -1597,7 +1597,7 @@ void SoapySDROutput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings&
|
||||
response.getSoapySdrOutputSettings()->setStreamArgSettings(new QList<SWGSDRangel::SWGArgValue*>);
|
||||
}
|
||||
|
||||
for (const auto itName : settings.m_streamArgSettings.keys())
|
||||
for (const auto& itName : settings.m_streamArgSettings.keys())
|
||||
{
|
||||
response.getSoapySdrOutputSettings()->getStreamArgSettings()->append(new SWGSDRangel::SWGArgValue);
|
||||
response.getSoapySdrOutputSettings()->getStreamArgSettings()->back()->setKey(new QString(itName));
|
||||
@ -1611,7 +1611,7 @@ void SoapySDROutput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings&
|
||||
response.getSoapySdrOutputSettings()->setDeviceArgSettings(new QList<SWGSDRangel::SWGArgValue*>);
|
||||
}
|
||||
|
||||
for (const auto itName : settings.m_deviceArgSettings.keys())
|
||||
for (const auto& itName : settings.m_deviceArgSettings.keys())
|
||||
{
|
||||
response.getSoapySdrOutputSettings()->getDeviceArgSettings()->append(new SWGSDRangel::SWGArgValue);
|
||||
response.getSoapySdrOutputSettings()->getDeviceArgSettings()->back()->setKey(new QString(itName));
|
||||
@ -1637,7 +1637,7 @@ void SoapySDROutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp
|
||||
|
||||
response.getSoapySdrOutputReport()->setDeviceSettingsArgs(new QList<SWGSDRangel::SWGArgInfo*>);
|
||||
|
||||
for (const auto itArg : m_deviceShared.m_deviceParams->getDeviceArgs())
|
||||
for (const auto& itArg : m_deviceShared.m_deviceParams->getDeviceArgs())
|
||||
{
|
||||
response.getSoapySdrOutputReport()->getDeviceSettingsArgs()->append(new SWGSDRangel::SWGArgInfo);
|
||||
webapiFormatArgInfo(itArg, response.getSoapySdrOutputReport()->getDeviceSettingsArgs()->back());
|
||||
@ -1645,7 +1645,7 @@ void SoapySDROutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp
|
||||
|
||||
response.getSoapySdrOutputReport()->setStreamSettingsArgs(new QList<SWGSDRangel::SWGArgInfo*>);
|
||||
|
||||
for (const auto itArg : channelSettings->m_streamSettingsArgs)
|
||||
for (const auto& itArg : channelSettings->m_streamSettingsArgs)
|
||||
{
|
||||
response.getSoapySdrOutputReport()->getStreamSettingsArgs()->append(new SWGSDRangel::SWGArgInfo);
|
||||
webapiFormatArgInfo(itArg, response.getSoapySdrOutputReport()->getStreamSettingsArgs()->back());
|
||||
@ -1653,7 +1653,7 @@ void SoapySDROutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp
|
||||
|
||||
response.getSoapySdrOutputReport()->setFrequencySettingsArgs(new QList<SWGSDRangel::SWGArgInfo*>);
|
||||
|
||||
for (const auto itArg : channelSettings->m_frequencySettingsArgs)
|
||||
for (const auto& itArg : channelSettings->m_frequencySettingsArgs)
|
||||
{
|
||||
response.getSoapySdrOutputReport()->getFrequencySettingsArgs()->append(new SWGSDRangel::SWGArgInfo);
|
||||
webapiFormatArgInfo(itArg, response.getSoapySdrOutputReport()->getFrequencySettingsArgs()->back());
|
||||
@ -1669,7 +1669,7 @@ void SoapySDROutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp
|
||||
{
|
||||
response.getSoapySdrOutputReport()->setAntennas(new QList<QString *>);
|
||||
|
||||
for (const auto itAntenna : channelSettings->m_antennas) {
|
||||
for (const auto& itAntenna : channelSettings->m_antennas) {
|
||||
response.getSoapySdrOutputReport()->getAntennas()->append(new QString(itAntenna.c_str()));
|
||||
}
|
||||
}
|
||||
@ -1685,7 +1685,7 @@ void SoapySDROutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp
|
||||
{
|
||||
response.getSoapySdrOutputReport()->setGainSettings(new QList<SWGSDRangel::SWGSoapySDRGainSetting*>);
|
||||
|
||||
for (const auto itGain : channelSettings->m_gainSettings)
|
||||
for (const auto& itGain : channelSettings->m_gainSettings)
|
||||
{
|
||||
response.getSoapySdrOutputReport()->getGainSettings()->append(new SWGSDRangel::SWGSoapySDRGainSetting());
|
||||
response.getSoapySdrOutputReport()->getGainSettings()->back()->setRange(new SWGSDRangel::SWGRangeFloat());
|
||||
@ -1699,7 +1699,7 @@ void SoapySDROutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp
|
||||
{
|
||||
response.getSoapySdrOutputReport()->setFrequencySettings(new QList<SWGSDRangel::SWGSoapySDRFrequencySetting*>);
|
||||
|
||||
for (const auto itFreq : channelSettings->m_frequencySettings)
|
||||
for (const auto& itFreq : channelSettings->m_frequencySettings)
|
||||
{
|
||||
response.getSoapySdrOutputReport()->getFrequencySettings()->append(new SWGSDRangel::SWGSoapySDRFrequencySetting());
|
||||
response.getSoapySdrOutputReport()->getFrequencySettings()->back()->setRanges(new QList<SWGSDRangel::SWGRangeFloat*>);
|
||||
@ -1805,13 +1805,13 @@ void SoapySDROutput::webapiFormatArgInfo(const SoapySDR::ArgInfo& arg, SWGSDRang
|
||||
|
||||
argInfo->setValueOptions(new QList<QString*>);
|
||||
|
||||
for (const auto itOpt : arg.options) {
|
||||
for (const auto& itOpt : arg.options) {
|
||||
argInfo->getValueOptions()->append(new QString(itOpt.c_str()));
|
||||
}
|
||||
|
||||
argInfo->setOptionNames(new QList<QString*>);
|
||||
|
||||
for (const auto itOpt : arg.optionNames) {
|
||||
for (const auto& itOpt : arg.optionNames) {
|
||||
argInfo->getOptionNames()->append(new QString(itOpt.c_str()));
|
||||
}
|
||||
}
|
||||
|
@ -1638,7 +1638,7 @@ void SoapySDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
|
||||
response.getSoapySdrInputSettings()->setTunableElements(new QList<SWGSDRangel::SWGArgValue*>);
|
||||
}
|
||||
|
||||
for (const auto itName : settings.m_tunableElements.keys())
|
||||
for (const auto& itName : settings.m_tunableElements.keys())
|
||||
{
|
||||
response.getSoapySdrInputSettings()->getTunableElements()->append(new SWGSDRangel::SWGArgValue);
|
||||
response.getSoapySdrInputSettings()->getTunableElements()->back()->setKey(new QString(itName));
|
||||
@ -1656,7 +1656,7 @@ void SoapySDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
|
||||
response.getSoapySdrInputSettings()->setIndividualGains(new QList<SWGSDRangel::SWGArgValue*>);
|
||||
}
|
||||
|
||||
for (const auto itName : settings.m_individualGains.keys())
|
||||
for (const auto& itName : settings.m_individualGains.keys())
|
||||
{
|
||||
response.getSoapySdrInputSettings()->getIndividualGains()->append(new SWGSDRangel::SWGArgValue);
|
||||
response.getSoapySdrInputSettings()->getIndividualGains()->back()->setKey(new QString(itName));
|
||||
@ -1689,7 +1689,7 @@ void SoapySDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
|
||||
response.getSoapySdrInputSettings()->setStreamArgSettings(new QList<SWGSDRangel::SWGArgValue*>);
|
||||
}
|
||||
|
||||
for (const auto itName : settings.m_streamArgSettings.keys())
|
||||
for (const auto& itName : settings.m_streamArgSettings.keys())
|
||||
{
|
||||
response.getSoapySdrInputSettings()->getStreamArgSettings()->append(new SWGSDRangel::SWGArgValue);
|
||||
response.getSoapySdrInputSettings()->getStreamArgSettings()->back()->setKey(new QString(itName));
|
||||
@ -1703,7 +1703,7 @@ void SoapySDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
|
||||
response.getSoapySdrInputSettings()->setDeviceArgSettings(new QList<SWGSDRangel::SWGArgValue*>);
|
||||
}
|
||||
|
||||
for (const auto itName : settings.m_deviceArgSettings.keys())
|
||||
for (const auto& itName : settings.m_deviceArgSettings.keys())
|
||||
{
|
||||
response.getSoapySdrInputSettings()->getDeviceArgSettings()->append(new SWGSDRangel::SWGArgValue);
|
||||
response.getSoapySdrInputSettings()->getDeviceArgSettings()->back()->setKey(new QString(itName));
|
||||
@ -1729,7 +1729,7 @@ void SoapySDRInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo
|
||||
|
||||
response.getSoapySdrInputReport()->setDeviceSettingsArgs(new QList<SWGSDRangel::SWGArgInfo*>);
|
||||
|
||||
for (const auto itArg : m_deviceShared.m_deviceParams->getDeviceArgs())
|
||||
for (const auto& itArg : m_deviceShared.m_deviceParams->getDeviceArgs())
|
||||
{
|
||||
response.getSoapySdrInputReport()->getDeviceSettingsArgs()->append(new SWGSDRangel::SWGArgInfo());
|
||||
webapiFormatArgInfo(itArg, response.getSoapySdrInputReport()->getDeviceSettingsArgs()->back());
|
||||
@ -1737,7 +1737,7 @@ void SoapySDRInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo
|
||||
|
||||
response.getSoapySdrInputReport()->setStreamSettingsArgs(new QList<SWGSDRangel::SWGArgInfo*>);
|
||||
|
||||
for (const auto itArg : channelSettings->m_streamSettingsArgs)
|
||||
for (const auto& itArg : channelSettings->m_streamSettingsArgs)
|
||||
{
|
||||
response.getSoapySdrInputReport()->getStreamSettingsArgs()->append(new SWGSDRangel::SWGArgInfo());
|
||||
webapiFormatArgInfo(itArg, response.getSoapySdrInputReport()->getStreamSettingsArgs()->back());
|
||||
@ -1745,7 +1745,7 @@ void SoapySDRInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo
|
||||
|
||||
response.getSoapySdrInputReport()->setFrequencySettingsArgs(new QList<SWGSDRangel::SWGArgInfo*>);
|
||||
|
||||
for (const auto itArg : channelSettings->m_frequencySettingsArgs)
|
||||
for (const auto& itArg : channelSettings->m_frequencySettingsArgs)
|
||||
{
|
||||
response.getSoapySdrInputReport()->getFrequencySettingsArgs()->append(new SWGSDRangel::SWGArgInfo());
|
||||
webapiFormatArgInfo(itArg, response.getSoapySdrInputReport()->getFrequencySettingsArgs()->back());
|
||||
@ -1761,7 +1761,7 @@ void SoapySDRInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo
|
||||
{
|
||||
response.getSoapySdrInputReport()->setAntennas(new QList<QString *>);
|
||||
|
||||
for (const auto itAntenna : channelSettings->m_antennas) {
|
||||
for (const auto& itAntenna : channelSettings->m_antennas) {
|
||||
response.getSoapySdrInputReport()->getAntennas()->append(new QString(itAntenna.c_str()));
|
||||
}
|
||||
}
|
||||
@ -1777,7 +1777,7 @@ void SoapySDRInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo
|
||||
{
|
||||
response.getSoapySdrInputReport()->setGainSettings(new QList<SWGSDRangel::SWGSoapySDRGainSetting*>);
|
||||
|
||||
for (const auto itGain : channelSettings->m_gainSettings)
|
||||
for (const auto& itGain : channelSettings->m_gainSettings)
|
||||
{
|
||||
response.getSoapySdrInputReport()->getGainSettings()->append(new SWGSDRangel::SWGSoapySDRGainSetting());
|
||||
response.getSoapySdrInputReport()->getGainSettings()->back()->setRange(new SWGSDRangel::SWGRangeFloat());
|
||||
@ -1791,7 +1791,7 @@ void SoapySDRInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo
|
||||
{
|
||||
response.getSoapySdrInputReport()->setFrequencySettings(new QList<SWGSDRangel::SWGSoapySDRFrequencySetting*>);
|
||||
|
||||
for (const auto itFreq : channelSettings->m_frequencySettings)
|
||||
for (const auto& itFreq : channelSettings->m_frequencySettings)
|
||||
{
|
||||
response.getSoapySdrInputReport()->getFrequencySettings()->append(new SWGSDRangel::SWGSoapySDRFrequencySetting());
|
||||
response.getSoapySdrInputReport()->getFrequencySettings()->back()->setRanges(new QList<SWGSDRangel::SWGRangeFloat*>);
|
||||
@ -1897,13 +1897,13 @@ void SoapySDRInput::webapiFormatArgInfo(const SoapySDR::ArgInfo& arg, SWGSDRange
|
||||
|
||||
argInfo->setValueOptions(new QList<QString*>);
|
||||
|
||||
for (const auto itOpt : arg.options) {
|
||||
for (const auto& itOpt : arg.options) {
|
||||
argInfo->getValueOptions()->append(new QString(itOpt.c_str()));
|
||||
}
|
||||
|
||||
argInfo->setOptionNames(new QList<QString*>);
|
||||
|
||||
for (const auto itOpt : arg.optionNames) {
|
||||
for (const auto& itOpt : arg.optionNames) {
|
||||
argInfo->getOptionNames()->append(new QString(itOpt.c_str()));
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ QHash<QString, int> CSV::readHeader(QTextStream &in, QStringList requiredColumns
|
||||
colNumbers.insert(row[i], i);
|
||||
}
|
||||
// Check all required columns exist
|
||||
for (const auto col : requiredColumns)
|
||||
for (const auto& col : requiredColumns)
|
||||
{
|
||||
if (!colNumbers.contains(col)) {
|
||||
error = QString("Missing column %1").arg(col);
|
||||
|
Loading…
Reference in New Issue
Block a user