fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
+26
-25
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "limits_module_test.h"
|
||||
#include <utility>
|
||||
#include "qtestcase.h"
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
@@ -71,7 +72,7 @@ void ModuleTestLimits::testExplosionClusterCentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->explosionClusters();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
@@ -104,7 +105,7 @@ void ModuleTestLimits::testExplosionClusterDecentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->explosionClusters();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if ((item.effectStateId == AesEffectState::EsPrepared) && (item.isCentral == false))
|
||||
++counter;
|
||||
@@ -140,7 +141,7 @@ void ModuleTestLimits::testAirSupports()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->explosionClusters();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral && m_pdmDtc->gearClassFromChargeTypeId(item.chargeStruct.chargeTypeId) == ProjectDataManagement::GearClass::GearClass_AirSupport)
|
||||
++counter;
|
||||
@@ -173,7 +174,7 @@ void ModuleTestLimits::testMineAreaCentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->mineAreas();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if ((item.effectStateId == AesEffectState::EsPrepared) && (item.isCentral == true))
|
||||
++counter;
|
||||
@@ -207,7 +208,7 @@ void ModuleTestLimits::testMineAreaDecentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->mineAreas();
|
||||
for (const auto &curMineArea : qAsConst(items))
|
||||
for (const auto &curMineArea : std::as_const(items))
|
||||
{
|
||||
if ((curMineArea.effectStateId == AesEffectState::EsPrepared) && (curMineArea.isCentral == false))
|
||||
++counter;
|
||||
@@ -234,7 +235,7 @@ void ModuleTestLimits::testMineAreaDecentral()
|
||||
int counter2 = 0;
|
||||
|
||||
const auto &mineAreas = m_aesDtc->mineAreas();
|
||||
for (const auto &item : qAsConst(mineAreas))
|
||||
for (const auto &item : std::as_const(mineAreas))
|
||||
{
|
||||
if ((item.effectStateId == AesEffectState::EsPrepared) &&
|
||||
!item.isCentral &&
|
||||
@@ -270,7 +271,7 @@ void ModuleTestLimits::testNBCCentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->nContaminations();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
@@ -305,7 +306,7 @@ void ModuleTestLimits::testNBCDecentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->nContaminations();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == false)
|
||||
++counter;
|
||||
@@ -337,7 +338,7 @@ void ModuleTestLimits::testOffRouteMines()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->offRouteMines();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
@@ -369,7 +370,7 @@ void ModuleTestLimits::testBoobyTraps()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->boobyTraps();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
@@ -404,7 +405,7 @@ void ModuleTestLimits::testBCCCentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->bCContaminations();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
@@ -439,7 +440,7 @@ void ModuleTestLimits::testBCCDecentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->bCContaminations();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == false)
|
||||
++counter;
|
||||
@@ -474,7 +475,7 @@ void ModuleTestLimits::testFADecentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->functionalAreas();
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == false)
|
||||
++counter;
|
||||
@@ -511,7 +512,7 @@ void ModuleTestLimits::testFACentral()
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->functionalAreas();
|
||||
|
||||
for (const auto &item : qAsConst(items))
|
||||
for (const auto &item : std::as_const(items))
|
||||
{
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
@@ -1192,7 +1193,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
const QVector<AesEffectState> sts = {AesEffectState::EsExpired, AesEffectState::EsRemoved, AesEffectState::EsActivated};
|
||||
|
||||
auto clusters = m_aesDtc->explosionClusters();
|
||||
for (auto cluster : qAsConst(clusters))
|
||||
for (auto cluster : std::as_const(clusters))
|
||||
{
|
||||
if (!sts.contains(cluster.effectStateId))
|
||||
{
|
||||
@@ -1202,7 +1203,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto nbcs = m_aesDtc->nContaminations();
|
||||
for (auto nbc : qAsConst(nbcs))
|
||||
for (auto nbc : std::as_const(nbcs))
|
||||
{
|
||||
if (!sts.contains(nbc.effectStateId))
|
||||
{
|
||||
@@ -1212,7 +1213,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto orms = m_aesDtc->offRouteMines();
|
||||
for (auto orm : qAsConst(orms))
|
||||
for (auto orm : std::as_const(orms))
|
||||
{
|
||||
if (!sts.contains(orm.effectStateId))
|
||||
{
|
||||
@@ -1222,7 +1223,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto bts = m_aesDtc->boobyTraps();
|
||||
for (auto bt : qAsConst(bts))
|
||||
for (auto bt : std::as_const(bts))
|
||||
{
|
||||
if (!sts.contains(bt.effectStateId))
|
||||
{
|
||||
@@ -1232,7 +1233,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto mas = m_aesDtc->mineAreas();
|
||||
for (auto ma : qAsConst(mas))
|
||||
for (auto ma : std::as_const(mas))
|
||||
{
|
||||
if (!sts.contains(ma.effectStateId))
|
||||
{
|
||||
@@ -1242,7 +1243,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto bccs = m_aesDtc->bCContaminations();
|
||||
for (auto bcc : qAsConst(bccs))
|
||||
for (auto bcc : std::as_const(bccs))
|
||||
{
|
||||
if (!sts.contains(bcc.effectStateId))
|
||||
{
|
||||
@@ -1252,7 +1253,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto fas = m_aesDtc->functionalAreas();
|
||||
for (auto fa : qAsConst(fas))
|
||||
for (auto fa : std::as_const(fas))
|
||||
{
|
||||
if (!sts.contains(fa.effectStateId))
|
||||
{
|
||||
@@ -1262,7 +1263,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto tas = m_aesDtc->technicalAreas();
|
||||
for (auto ta : qAsConst(tas))
|
||||
for (auto ta : std::as_const(tas))
|
||||
{
|
||||
if (!sts.contains(ta.effectStateId))
|
||||
{
|
||||
@@ -1273,7 +1274,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
|
||||
auto eas = m_aesDtc->explosionAreas();
|
||||
for (auto ea : qAsConst(eas))
|
||||
for (auto ea : std::as_const(eas))
|
||||
{
|
||||
if (!sts.contains(ea.effectStateId))
|
||||
{
|
||||
@@ -1284,7 +1285,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
|
||||
auto ess = m_aesDtc->explosionSingles();
|
||||
for (auto es : qAsConst(ess))
|
||||
for (auto es : std::as_const(ess))
|
||||
{
|
||||
if (!sts.contains(es.effectStateId))
|
||||
{
|
||||
@@ -1360,7 +1361,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
const QStringList &slPositionalArgs = options.positionalArguments();
|
||||
for (const QString &item : qAsConst(slPositionalArgs))
|
||||
for (const QString &item : std::as_const(slPositionalArgs))
|
||||
std::cout << " item = " << item << std::endl;
|
||||
|
||||
// enable_create_bulk only if it´s explicitly called by user:
|
||||
|
||||
Reference in new issue
Block a user