Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
@@ -41,7 +41,7 @@ NGL_TARGET_LINK_LIBRARIES(svcAlmCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddscore
|
||||
NGLLogger
|
||||
svcPdmCommon
|
||||
@@ -111,7 +111,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcAlmServer
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAlmServer
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddsfts
|
||||
ddsconnector
|
||||
ddsQoS
|
||||
|
||||
+2
-2
@@ -28,8 +28,8 @@ IF(BUILD_TESTING)
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(almTests ${SRCS_TEST_ALM} ${HDRS_TEST_ALM})
|
||||
TARGET_LINK_LIBRARIES(almTests
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAlmClient
|
||||
svcCoreClient
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_configure_alarms.h"
|
||||
#include <utility>
|
||||
#include "initialization.h"
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
@@ -245,7 +246,7 @@ void HandlerConfigureAlarms::onEventChanged(const ExerciseEventManagement::Event
|
||||
// Schleife ueber jeden Participant in der Konfiguration
|
||||
// Vergleich Participant-ID Event mit Konfiguration Event
|
||||
// Wenn ja, Alarm an operatorId schicken
|
||||
for (const Database::AlmConfig &alarm : qAsConst(m_alarms))
|
||||
for (const Database::AlmConfig &alarm : std::as_const(m_alarms))
|
||||
{
|
||||
{
|
||||
/*DEBUG_LOG(m_logger) << " alarmConfigItem.id=" << alarm.id
|
||||
@@ -267,7 +268,7 @@ void HandlerConfigureAlarms::onEventChanged(const ExerciseEventManagement::Event
|
||||
else
|
||||
participants.append(0);
|
||||
|
||||
for (int participantId : qAsConst(participants))
|
||||
for (int participantId : std::as_const(participants))
|
||||
{
|
||||
bool allVulnerabilityStates = alarm.vulnerabilityState == -1;
|
||||
bool vulnerabilityCheck = vulnerabilityState == alarm.vulnerabilityState;
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_emergency_call.h"
|
||||
#include <utility>
|
||||
#include "initialization.h"
|
||||
#include "handler_configure_alarms.h"
|
||||
#include "object_emergency_call.h"
|
||||
@@ -131,7 +132,7 @@ void HandlerEmergencyCall::onEmergencyCallAcknowledgeRequest(const rti::core::Sa
|
||||
Core::FunctionReplyObject HandlerEmergencyCall::emergencyCallAcknowledgeRequest(const EmergencyCallAcknowledgeRequest &request)
|
||||
{
|
||||
ObjectEmergencyCall *ifs = nullptr;
|
||||
for(auto _ifs : qAsConst(m_emergencyObjMap))
|
||||
for(auto _ifs : std::as_const(m_emergencyObjMap))
|
||||
{
|
||||
auto data = _ifs->getData();
|
||||
if (data.issi == request.issi()
|
||||
@@ -182,7 +183,7 @@ bool HandlerEmergencyCall::isExerciseValidForEmergencyCall() const
|
||||
|
||||
bool HandlerEmergencyCall::isNewEmergencyCall(const AlmEmergencyCall &newdata)
|
||||
{
|
||||
for(const auto &ifs : qAsConst(m_emergencyObjMap))
|
||||
for(const auto &ifs : std::as_const(m_emergencyObjMap))
|
||||
{
|
||||
const auto &data = ifs->getData();
|
||||
if (data.issi == newdata.issi()
|
||||
|
||||
@@ -81,9 +81,9 @@ NGL_TARGET_LINK_LIBRARIES(svcAesCommon
|
||||
RTI::nddscpp2
|
||||
LtsCoordTrans
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Xml
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Xml
|
||||
ddscore
|
||||
svcPdmCommon
|
||||
svcPpmCommon
|
||||
@@ -177,7 +177,7 @@ IF (TARGET aesRecordReplayPlugin)
|
||||
RecordReplay/aes_record_replay_plugin_custom.h
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(aesRecordReplayPlugin
|
||||
Qt5::Concurrent
|
||||
Qt6::Concurrent
|
||||
svcAesServer
|
||||
svcAesClient
|
||||
)
|
||||
@@ -329,8 +329,8 @@ NGL_TARGET_LINK_LIBRARIES(svcAreaEffectSimulation
|
||||
svcIsmClient
|
||||
svcExmClient
|
||||
svcAsmClient
|
||||
Qt5::Core
|
||||
Qt5::Gui # QVector3D
|
||||
Qt6::Core
|
||||
Qt6::Gui # QVector3D
|
||||
RTI::nddscpp2
|
||||
nglsettings
|
||||
ProjectConfig
|
||||
@@ -360,8 +360,8 @@ MACRO(ADD_FT_TEST type)
|
||||
ModuleTests/aes_test_base.h
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(aes_test_base
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
ddsconnector
|
||||
LtsCommandLineParser
|
||||
nglcoreapplication
|
||||
@@ -403,13 +403,12 @@ NGL_ADD_EXECUTABLE(AAR SV NO_TRANSLATION aes_utils_test
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(aes_utils_test
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
ProjectConfig
|
||||
ddsconnector
|
||||
nglapplication
|
||||
LtsCoordTrans
|
||||
)
|
||||
NGL_INSTALL(AAR SV TARGETS aes_utils_test DESTINATION bin/test)
|
||||
@@ -422,8 +421,8 @@ NGL_ADD_EXECUTABLE(SV NO_TRANSLATION aes_convert_mine_area
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(aes_convert_mine_area
|
||||
Qt5::Core
|
||||
# Qt5::Widgets
|
||||
Qt6::Core
|
||||
# Qt6::Widgets
|
||||
# RTI::nddscpp2
|
||||
svcAesServer
|
||||
ProjectConfig
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "abstract_firing_strategy.h"
|
||||
#include <utility>
|
||||
|
||||
#include "object_effector.h"
|
||||
#include "main_handler.h"
|
||||
@@ -87,7 +88,7 @@ std::vector<Core::GeoPositionRelativeTime> AbstractFiringStrategy::buildTrajecto
|
||||
geometry.reserve(relativeTrajectory.size());
|
||||
|
||||
// Aehnlich wie Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/aes_handler.cpp Zeile 365
|
||||
for (const TrajectoryPoint &trajPntRelPos : qAsConst(relativeTrajectory))
|
||||
for (const TrajectoryPoint &trajPntRelPos : std::as_const(relativeTrajectory))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Flugbahnpunkt: trajPntRelPos :" << trajPntRelPos; // benefit from operator<<:
|
||||
|
||||
@@ -187,7 +188,7 @@ int32_t AbstractFiringStrategy::gearTypeId(int chargeTypeId, int participantId)
|
||||
DEBUG_LOG(m_logger) << "gearSize " << dynamicParticipantData.gear().size();
|
||||
|
||||
const auto& participantData_gear = dynamicParticipantData.gear();
|
||||
for (const auto &gear : qAsConst(participantData_gear))
|
||||
for (const auto &gear : std::as_const(participantData_gear))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "gear.chargeTypeId(): " << gear.chargeTypeId() << ", chargeTypeId:" << chargeTypeId;
|
||||
if (gear.chargeTypeId() == chargeTypeId)
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "dm72_firing_strategy.h"
|
||||
#include <utility>
|
||||
|
||||
#include "main_handler.h"
|
||||
#include "object_effector.h"
|
||||
@@ -72,7 +73,7 @@ void Dm72FiringStrategy::init()
|
||||
QVector<UtmWithHeight> tempUtmTreffpunkte;
|
||||
tempUtmTreffpunkte.reserve(wirkmittel.geschoss.anzahl);
|
||||
|
||||
for (const Treffpunkt &treffpunkt : qAsConst(wirkmittel.treffpunkte))
|
||||
for (const Treffpunkt &treffpunkt : std::as_const(wirkmittel.treffpunkte))
|
||||
{
|
||||
const UtmCoordinate utmTreffpunkt = UtmCoordinate::fromGeographic(treffpunkt.koordinate.koordinate.longitude * deg2rad(),
|
||||
treffpunkt.koordinate.koordinate.latitude * deg2rad(),
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "gmlrs_firing_strategy.h"
|
||||
#include <utility>
|
||||
#include "object_effector.h"
|
||||
|
||||
#include <TrainingAreaBase/Plugins/AdlerJson/telegrams.h>
|
||||
@@ -68,7 +69,7 @@ void GmlrsFiringStrategy::init()
|
||||
WirkmittelFeuerkommandoRakete wirkmittel;
|
||||
wirkmittelFeuerkommandoRaketeFromJson(properties, wirkmittel, bOk);
|
||||
|
||||
for (const Treffpunkt &treffpunkt : qAsConst(wirkmittel.treffpunkte))
|
||||
for (const Treffpunkt &treffpunkt : std::as_const(wirkmittel.treffpunkte))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate utmTreffpunkt =
|
||||
LtsCoordTrans::UtmCoordinate::fromGeographic(treffpunkt.koordinate.koordinate.longitude * LtsCoordTrans::deg2rad(),
|
||||
|
||||
+8
-2
@@ -13,13 +13,19 @@ SET(UnitTestSources
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesModuleTestEffectCluster ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestEffectCluster
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesModuleTestEffectCluster
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
LtsCommandLineParser
|
||||
LtsCoordinate
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
ddsconnector
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "effect_cluster_module_test.h"
|
||||
#include <utility>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
|
||||
@@ -934,7 +935,7 @@ int main(int argc, char *argv[])
|
||||
--argc;
|
||||
|
||||
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;
|
||||
|
||||
ModuleTestEffectCluster tc(options.domainId(), options.exerciseId());
|
||||
|
||||
+8
-2
@@ -13,13 +13,19 @@ SET(UnitTestSources
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesModuleTestExplosionCluster ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestExplosionCluster
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesModuleTestExplosionCluster
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
LtsCommandLineParser
|
||||
LtsCoordinate
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
ddsconnector
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
|
||||
+9
-8
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "explosion_cluster_module_test.h"
|
||||
#include <utility>
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
@@ -265,7 +266,7 @@ void ModuleTestExplosionCluster::dumpCnt()
|
||||
void ModuleTestExplosionCluster::dumpBldgStates()
|
||||
{
|
||||
NOTICE_LOG(m_logger) << " m_buildingStateVec.size() = " << m_buildingStateVec.size();
|
||||
for (const Buildings::BuildingState &bldgState : qAsConst(m_buildingStateVec))
|
||||
for (const Buildings::BuildingState &bldgState : std::as_const(m_buildingStateVec))
|
||||
NOTICE_LOG(m_logger) << " bldgState: "
|
||||
<< ", id = " << bldgState.id()
|
||||
<< ", damagePercent = " << bldgState.damagePercent()
|
||||
@@ -336,7 +337,7 @@ bool ModuleTestExplosionCluster::checkBldgStates(const QVector<int> &damagePerce
|
||||
QVector<int> damagePercentIst;
|
||||
damagePercentIst.reserve(m_buildingStateVec.size());
|
||||
|
||||
for (const Buildings::BuildingState &bldgState : qAsConst(m_buildingStateVec))
|
||||
for (const Buildings::BuildingState &bldgState : std::as_const(m_buildingStateVec))
|
||||
damagePercentIst.append(bldgState.damagePercent());
|
||||
|
||||
bool same = damagePercentIst == damagePercent;
|
||||
@@ -935,7 +936,7 @@ void ModuleTestExplosionCluster::resetBldgs()
|
||||
std::vector<Buildings::Building> buildingsVec;
|
||||
buildingsVec.reserve(m_bldgIdToName.size());
|
||||
auto bldgIds = m_bldgIdToName.keys();
|
||||
for (int bldgId : qAsConst(bldgIds))
|
||||
for (int bldgId : std::as_const(bldgIds))
|
||||
buildingsVec.push_back( Buildings::Building(bldgId, {}) );
|
||||
|
||||
Buildings::SetBuildingStatesRequest requestData;
|
||||
@@ -951,7 +952,7 @@ void ModuleTestExplosionCluster::resetBldgs()
|
||||
QTest::qWait(100);
|
||||
|
||||
// check states:
|
||||
for (int bldgId : qAsConst(bldgIds))
|
||||
for (int bldgId : std::as_const(bldgIds))
|
||||
{
|
||||
const ProjectDataManagement::VulnerabilityState& bldgState = m_bldDtc->buildingState(bldgId).vulnerabilityState();
|
||||
INFO_LOG(m_logger) << "resetBldgs: bldgId " << bldgId
|
||||
@@ -1292,7 +1293,7 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_01()
|
||||
<< ", m_data.mhPoints().size()=" << m_data.mhPoints().size();
|
||||
|
||||
const std::vector<Core::GeoPosition> &formRef = itemView.form();
|
||||
for (const Core::GeoPosition &geoCoord : qAsConst(formRef))
|
||||
for (const Core::GeoPosition &geoCoord : std::as_const(formRef))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon(), geoCoord.lat());
|
||||
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " utm: " << utm.mgrs() << ", item=" << geoCoord;
|
||||
@@ -1391,7 +1392,7 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_02()
|
||||
<< ", m_data.mhPoints().size()=" << m_data.mhPoints().size();
|
||||
|
||||
const std::vector<Core::GeoPosition> &formRef = itemView.form();
|
||||
for (const Core::GeoPosition &geoCoord : qAsConst(formRef))
|
||||
for (const Core::GeoPosition &geoCoord : std::as_const(formRef))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon(), geoCoord.lat());
|
||||
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " utm: " << utm.mgrs() << ", item=" << geoCoord;
|
||||
@@ -2364,7 +2365,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_effects_only()
|
||||
QVERIFY2(m_counterDds.cntTrajectory == 0, "ERROR, cnt failed!!"); // 4 impacts -> 4 trajectory
|
||||
|
||||
std::vector<AreaEffectSimulation::SingleEffect>&singleEffects = m_effects.singleEffects();
|
||||
for (const AreaEffectSimulation::SingleEffect &se : qAsConst(singleEffects))
|
||||
for (const AreaEffectSimulation::SingleEffect &se : std::as_const(singleEffects))
|
||||
{
|
||||
// Since there is no trajectory, no intersection is calculated.
|
||||
// Therefore the impacts are on the ground.
|
||||
@@ -2741,7 +2742,7 @@ int main(int argc, char *argv[])
|
||||
--argc;
|
||||
|
||||
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:
|
||||
|
||||
+8
-2
@@ -12,13 +12,19 @@ SET(UnitTestSources
|
||||
|
||||
NGL_ADD_EXECUTABLE(SV aesModuleTestLimits ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestLimits
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(aesModuleTestLimits
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
LtsCommandLineParser
|
||||
LtsCoordTrans
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
ddsconnector
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
|
||||
+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::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::type> 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().underlying()))
|
||||
{
|
||||
@@ -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().underlying()))
|
||||
{
|
||||
@@ -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().underlying()))
|
||||
{
|
||||
@@ -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().underlying()))
|
||||
{
|
||||
@@ -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().underlying()))
|
||||
{
|
||||
@@ -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().underlying()))
|
||||
{
|
||||
@@ -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().underlying()))
|
||||
{
|
||||
@@ -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().underlying()))
|
||||
{
|
||||
@@ -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().underlying()))
|
||||
{
|
||||
@@ -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().underlying()))
|
||||
{
|
||||
@@ -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:
|
||||
|
||||
+8
-2
@@ -13,13 +13,19 @@ SET(UnitTestSources
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesModuleTestOthers ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestOthers
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesModuleTestOthers
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
LtsCommandLineParser
|
||||
LtsCoordinate
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
ddsconnector
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "aes_others_module_test.h"
|
||||
#include <utility>
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
@@ -812,7 +813,7 @@ int main(int argc, char *argv[])
|
||||
--argc;
|
||||
|
||||
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:
|
||||
|
||||
+3
-2
@@ -20,6 +20,7 @@ NGL_ADD_LIBRARY2(WS SV HLA Trajectory SHARED
|
||||
)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(Trajectory
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(Trajectory
|
||||
@@ -31,8 +32,8 @@ NGL_TARGET_LINK_LIBRARIES(Trajectory
|
||||
LtsElevation
|
||||
LtsUtilsCore
|
||||
LtsCoordTrans
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
)
|
||||
|
||||
ADD_SUBDIRECTORY(UnitTest_Trajectory)
|
||||
+14
-4
@@ -15,15 +15,25 @@ SET(UnitTestSources
|
||||
)
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesUnitTestTrajectory ${LinkedSources} ${UnitTestSources} )
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestTrajectory ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestTrajectory
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/AreaEffectSimulation
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestTrajectory
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
svcAesCommon
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Test)
|
||||
Trajectory
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Test)
|
||||
|
||||
ADD_TEST(NAME aesUnitTestTrajectory COMMAND $<TARGET_FILE:aesUnitTestTrajectory>)
|
||||
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "trajectory_unit_test.h"
|
||||
#include <utility>
|
||||
#include <Trajectory/trajectory_helper.h>
|
||||
#include <Trajectory/trajectory_generator.h>
|
||||
#include <Trajectory/trajectory_generator_vulcano.h>
|
||||
@@ -991,7 +992,7 @@ void UnitTestTrajectory::test_vulcano_trajectory()
|
||||
}
|
||||
|
||||
int i=0;
|
||||
for (auto &item : qAsConst(trajectoryOut))
|
||||
for (auto &item : std::as_const(trajectoryOut))
|
||||
INFO_LOG(m_logger) << "i = " << i++ << ", item " << item;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "trajectory_generator.h"
|
||||
#include <utility>
|
||||
#include "trajectory_generator_vulcano.h"
|
||||
#include <Plugins/ExerciseManagement/exm_data_plugin_interface.h>
|
||||
#include <Plugins/AssetManagement/asm_data_plugin_interface.h>
|
||||
@@ -199,7 +200,7 @@ bool TrajectoryGenerator::generateTrajectoryVulcano(const QPoint3D &originatorPo
|
||||
{
|
||||
QPoint4D startPoint = trajectoryMetricOut.first();
|
||||
|
||||
for (const QPoint4D &p4D : qAsConst(trajectoryMetricOut))
|
||||
for (const QPoint4D &p4D : std::as_const(trajectoryMetricOut))
|
||||
{
|
||||
output << p4D.x() - startPoint.x() << ";"
|
||||
<< p4D.y() - startPoint.y() << ";"
|
||||
@@ -231,7 +232,7 @@ bool TrajectoryGenerator::generateTrajectoryVulcano(const QPoint3D &originatorPo
|
||||
trajectoryTimeAwareOut.clear();
|
||||
trajectoryTimeAwareOut.reserve(trajectoryMetricOut.size());
|
||||
|
||||
for (const QPoint4D& pnt4d : qAsConst(trajectoryMetricOut))
|
||||
for (const QPoint4D& pnt4d : std::as_const(trajectoryMetricOut))
|
||||
{
|
||||
LtsCoordTrans::UtmCoordinate pntUtm(idealHitUtm.zone, pnt4d.x(), pnt4d.y());
|
||||
const QPointF &pntGeo = pntUtm.geographic();
|
||||
|
||||
+2
-1
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "trajectory_generator_vulcano.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QObject>
|
||||
#include <QPointF>
|
||||
@@ -171,7 +172,7 @@ bool TrajectoryGeneratorVulcano::trajectoryVulcano(const QPoint3D &origin, const
|
||||
trajectoryOut.reserve(phase1_bal.size()+5);
|
||||
|
||||
int cnt = 0;
|
||||
for (const QPointF &xyVertex : qAsConst(phase1_bal))
|
||||
for (const QPointF &xyVertex : std::as_const(phase1_bal))
|
||||
{
|
||||
// translate from XY to XYZ
|
||||
const QPoint3D p3d_offset(xyVertex.x() * factorX, // xyVertex.x()
|
||||
|
||||
+10
-3
@@ -15,13 +15,20 @@ SET(UnitTestSources
|
||||
SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} )
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesUnitTestTrajectorySplitter ${LinkedSources} ${UnitTestSources} )
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestTrajectorySplitter ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestTrajectorySplitter
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestTrajectorySplitter
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
svcAesCommon
|
||||
)
|
||||
|
||||
|
||||
+10
-3
@@ -11,15 +11,22 @@ SET(UnitTestSources
|
||||
)
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesUnitTestFireAutomaton ${LinkedSources} ${UnitTestSources} )
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestFireAutomaton ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestFireAutomaton
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestFireAutomaton
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
LtsCommandLineParser
|
||||
LtsCoordinate
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
ddsconnector
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
|
||||
+5
-2
@@ -19,6 +19,9 @@ NGL_ADD_EXECUTABLE(AAR SV NO_TRANSLATION aes_statemachine_test
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES( aes_statemachine_test
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
|
||||
|
||||
@@ -35,8 +38,8 @@ NGL_TARGET_LINK_LIBRARIES(aes_statemachine_test
|
||||
svcIsmClient
|
||||
svcAsmClient
|
||||
svcExmClient
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
)
|
||||
NGL_TARGET_COMPILE_DEFINITIONS(aes_statemachine_test PRIVATE AES_STATEMACHINE_TEST)
|
||||
IF(TARGET aes_statemachine_test)
|
||||
|
||||
+10
-3
@@ -13,14 +13,21 @@ SET(UnitTestSources
|
||||
SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} )
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesUnitTestBasics ${LinkedSources} ${UnitTestSources} )
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestBasics ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestBasics
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestBasics
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
LtsCoordTrans
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
svcAesCommon
|
||||
)
|
||||
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "basics_unit_test.h"
|
||||
#include <utility>
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <AreaEffectSimulation/aes.hpp>
|
||||
@@ -246,7 +247,7 @@ void UnitTestBasics::test_fireTimer10()
|
||||
QStringList logSl1 = ft.getLogHistorie();
|
||||
QVERIFY2(logSl1.size() == 1, "getCommandHistorie failed");
|
||||
|
||||
for (const auto &log : qAsConst(logSl1))
|
||||
for (const auto &log : std::as_const(logSl1))
|
||||
NOTICE_LOG(m_logger) << "log ='" << log << "'";
|
||||
}
|
||||
|
||||
@@ -319,7 +320,7 @@ void UnitTestBasics::test_fireTimer20()
|
||||
|
||||
// QList<QVariant> arguments = spyStateChanged.takeFirst(); // take the first signal
|
||||
// NOTICE_LOG(m_logger) << " spyStateChanged.count() " << spyStateChanged.count();
|
||||
// for (const QList<QVariant> &argument : qAsConst(spyStateChanged))
|
||||
// for (const QList<QVariant> &argument : std::as_const(spyStateChanged))
|
||||
// NOTICE_LOG(m_logger) << " spyStateChanged . argument " << argument.first().toInt();
|
||||
|
||||
// check order of signal paramter:
|
||||
|
||||
+10
-3
@@ -13,14 +13,21 @@ SET(UnitTestSources
|
||||
SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} )
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesUnitTestPolygons ${LinkedSources} ${UnitTestSources} )
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestPolygons ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestPolygons
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestPolygons
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
LtsCoordTrans
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
svcAesCommon
|
||||
)
|
||||
|
||||
|
||||
+4
-3
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "polygons_unit_test.h"
|
||||
#include <utility>
|
||||
#include <Services/AreaEffectSimulation/Utils/polygons.h>
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
@@ -210,7 +211,7 @@ void UnitTestPolygons::test_explosionClusterSingleExplosionsGAUSS_Mtp()
|
||||
qCritical() << "rotation_deg = " << rotation_deg
|
||||
<< ", mtpRotationNorthDegree = " << mtpRotationNorthDegree
|
||||
<< ", explosionClusterDb = " << singleExplosions;
|
||||
for (const auto &singleExplosion : qAsConst(singleExplosions))
|
||||
for (const auto &singleExplosion : std::as_const(singleExplosions))
|
||||
qDebug() << "singleExUtm: " << LtsCoordTrans::UtmCoordinate::fromGeographic(singleExplosion).mgrs();
|
||||
|
||||
size_t i = 0;
|
||||
@@ -242,7 +243,7 @@ void UnitTestPolygons::test_explosionClusterSingleExplosionsGAUSS_Mtp()
|
||||
qCritical() << "rotation_deg = " << rotation_deg
|
||||
<< ", mtpRotationNorthDegree = " << mtpRotationNorthDegree
|
||||
<< " explosionClusterDb = " << singleExplosions;
|
||||
for (const auto &singleExplosion : qAsConst(singleExplosions))
|
||||
for (const auto &singleExplosion : std::as_const(singleExplosions))
|
||||
qCritical() << "singleExUtm: " << LtsCoordTrans::UtmCoordinate::fromGeographic(singleExplosion).mgrs();
|
||||
|
||||
size_t i = 0;
|
||||
@@ -279,7 +280,7 @@ void UnitTestPolygons::test_explosionClusterSingleExplosionsGAUSS_Mtp()
|
||||
<< ", zog = " << zog
|
||||
<< ", mtpRotationNorthDegree = " << mtpRotationNorthDegree
|
||||
<< " explosionClusterDb = " << singleExplosions;
|
||||
for (const auto &singleExplosion : qAsConst(singleExplosions))
|
||||
for (const auto &singleExplosion : std::as_const(singleExplosions))
|
||||
qCritical() << "singleExUtm: " << LtsCoordTrans::UtmCoordinate::fromGeographic(singleExplosion).mgrs();
|
||||
|
||||
size_t i = 0;
|
||||
|
||||
+10
-3
@@ -13,13 +13,20 @@ SET(UnitTestSources
|
||||
SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} )
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesUnitTestTneAlgorithmen ${LinkedSources} ${UnitTestSources} )
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestTneAlgorithmen ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestTneAlgorithmen
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestTneAlgorithmen
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
svcAesCommon
|
||||
)
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "icons.h"
|
||||
#include <utility>
|
||||
#include "polygons.h"
|
||||
|
||||
#include <AreaEffectSimulation/aes.hpp>
|
||||
@@ -54,7 +55,7 @@ static QPixmap pixmapFromPolygons(const QVector<PolygonData> &datas,
|
||||
for (const PolygonData &data : datas)
|
||||
{
|
||||
polyUtm.clear();
|
||||
for (const QPointF &point : qAsConst(data.poly))
|
||||
for (const QPointF &point : std::as_const(data.poly))
|
||||
{
|
||||
LtsCoordTrans::UtmCoordinate pointUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(point, zone);
|
||||
polyUtm << QPointF(pointUtm.x, pointUtm.y);
|
||||
@@ -66,7 +67,7 @@ static QPixmap pixmapFromPolygons(const QVector<PolygonData> &datas,
|
||||
bounding.reserve(4 * datas.size());
|
||||
// Does not matter, how the total polygon looks as we just need the bounding rect.
|
||||
// << is cheaper than .united()
|
||||
for (const QPolygonF &polyUtmLocal : qAsConst(polysUtm))
|
||||
for (const QPolygonF &polyUtmLocal : std::as_const(polysUtm))
|
||||
bounding << polyUtmLocal;
|
||||
|
||||
// center to center / Todo:: Does it always work?
|
||||
@@ -89,7 +90,7 @@ static QPixmap pixmapFromPolygons(const QVector<PolygonData> &datas,
|
||||
|
||||
QPainter p(&pix);
|
||||
int i = 0;
|
||||
for (const PolygonData &d : qAsConst(datas))
|
||||
for (const PolygonData &d : std::as_const(datas))
|
||||
{
|
||||
QPolygonF mPoly = mTrans.map(polysUtm.at(i++));
|
||||
mPoly = mScale.map(mPoly);
|
||||
|
||||
+12
-11
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "polygons.h"
|
||||
#include <utility>
|
||||
#include "tne_algorithmen.h"
|
||||
|
||||
#include <aes.hpp>
|
||||
@@ -112,7 +113,7 @@ static QPolygonF utmToGeogrphic(const QPolygonF &polyUtm, const LtsCoordTrans::U
|
||||
{
|
||||
QPolygonF poly;
|
||||
poly.reserve(polyUtm.size());
|
||||
for (const QPointF &point : qAsConst(polyUtm))
|
||||
for (const QPointF &point : std::as_const(polyUtm))
|
||||
poly << base.geographic(point);
|
||||
return poly;
|
||||
}
|
||||
@@ -476,7 +477,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS(const Database::AesEffectClu
|
||||
|
||||
vec.reserve(impactCount);
|
||||
const QTransform trans(fromRotation(-effectCluster.rotationAngle)); // Compass, not mathematical!
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
{
|
||||
QPointF p = impactPositionUtm.geographic(trans.map(point));
|
||||
DEBUG_LOG(logger) << "Point = " << p;
|
||||
@@ -552,7 +553,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec
|
||||
|
||||
QVector<LtsCoordTrans::UtmCoordinate> mtps_asRealUtm;
|
||||
mtps_asRealUtm.reserve(mtps_asUtm.size());
|
||||
for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm))
|
||||
for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm))
|
||||
{
|
||||
// convert QPointF back to UtmCoordinate: pay attention to order!!!
|
||||
const LtsCoordTrans::UtmCoordinate mtpUtm(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y());
|
||||
@@ -591,7 +592,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec
|
||||
|
||||
int idx = 0;
|
||||
const QTransform transform(fromRotation(-mtpRotationNorthDegree)); // Compass, not mathematical!
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
{
|
||||
// which mtp:
|
||||
int mtpIdx = (idx++ % mtps_asUtm.size()); // modulo
|
||||
@@ -606,7 +607,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec
|
||||
<< ", randomNumber=" << randomNumber << " singleWidthOut=" << singleWidthOut << " singleHeightOut=" << singleHeightOut
|
||||
<< " rot=" << explosionCluster.rotationAngle;
|
||||
|
||||
for (auto item : qAsConst(finalVec))
|
||||
for (auto item : std::as_const(finalVec))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(item);
|
||||
qCritical() << " TNE VERIFICATION: CHECK:"
|
||||
@@ -900,7 +901,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS(const Database::AesExplos
|
||||
|
||||
vec.reserve(impactCount);
|
||||
const QTransform trans(fromRotation(-explosionCluster.rotationAngle)); // Compass, not mathematical!
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
{
|
||||
QPointF p = impactPositionUtm.geographic(trans.map(point));
|
||||
DEBUG_LOG(logger) << "Point = " << p;
|
||||
@@ -977,7 +978,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx
|
||||
|
||||
QVector<LtsCoordTrans::UtmCoordinate> mtps_asRealUtm;
|
||||
mtps_asRealUtm.reserve(mtps_asUtm.size());
|
||||
for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm))
|
||||
for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm))
|
||||
{
|
||||
// convert QPointF back to UtmCoordinate: pay attention to order!!!
|
||||
const LtsCoordTrans::UtmCoordinate mtpUtm(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y());
|
||||
@@ -1016,7 +1017,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx
|
||||
|
||||
int idx = 0;
|
||||
const QTransform transform(fromRotation(-mtpRotationNorthDegree)); // Compass, not mathematical!
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
{
|
||||
// which mtp:
|
||||
int mtpIdx = (idx++ % mtps_asUtm.size()); // modulo
|
||||
@@ -1031,7 +1032,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx
|
||||
<< ", randomNumber=" << randomNumber << " singleWidthOut=" << singleWidthOut << " singleHeightOut=" << singleHeightOut
|
||||
<< " rot=" << explosionCluster.rotationAngle;
|
||||
|
||||
for (auto item : qAsConst(finalVec))
|
||||
for (auto item : std::as_const(finalVec))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(item);
|
||||
qCritical() << " TNE VERIFICATION: CHECK:"
|
||||
@@ -1678,7 +1679,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
int childCount = 0;
|
||||
LtsUtils::QPoint3D pos;
|
||||
|
||||
for (int childId : qAsConst(childIds))
|
||||
for (int childId : std::as_const(childIds))
|
||||
{
|
||||
const ParticipantManagement::ParticipantPosition &childPos = ppmDtc->participantPosition(childId);
|
||||
if (childPos.participantId() != childId)
|
||||
@@ -1731,7 +1732,7 @@ std::vector<Core::GeoPosition2D> dangerAreaDefaultSegments(const QPointF ¢er
|
||||
// polyUtm = QTransform().rotate(0).map(polyUtm);
|
||||
LtsCoordTrans::UtmCoordinate impactPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(centerPos);
|
||||
const QPolygonF poly(utmToGeogrphic(polyUtm, impactPositionUtm));
|
||||
for (const auto &p : qAsConst(poly))
|
||||
for (const auto &p : std::as_const(poly))
|
||||
segments.push_back(Core::GeoPosition2D(p.x(), p.y()));
|
||||
|
||||
return segments;
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_explosion_single_central.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
@@ -35,7 +36,7 @@ bool HandlerExplosionSingleCentral::init()
|
||||
return true;
|
||||
}
|
||||
// create indirect fire single objects
|
||||
for (const Database::AesExplosionSingleCentral &dbData : qAsConst(dataVec))
|
||||
for (const Database::AesExplosionSingleCentral &dbData : std::as_const(dataVec))
|
||||
{
|
||||
ObjectExplosionSingleCentral *ifs(new ObjectExplosionSingleCentral(m_mainHandler, this));
|
||||
connect(ifs, &ObjectExplosionSingleCentral::effectStateChanged, this, &HandlerExplosionSingleCentral::onEffectStateChanged);
|
||||
|
||||
+9
-8
@@ -6,6 +6,7 @@
|
||||
* $Author$
|
||||
*/
|
||||
#include "aes_dtc_impl_custom.h"
|
||||
#include <utility>
|
||||
#include <DDS/DTC/generic_dtc.h>
|
||||
#include <DDS/Generic/generic_data_reader.h>
|
||||
#include <QElapsedTimer>
|
||||
@@ -120,7 +121,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::BCContamination> bcConts = bCContaminations();
|
||||
aesItemId = 0;
|
||||
for (const AreaEffectSimulation::BCContamination &bcCont : qAsConst(bcConts))
|
||||
for (const AreaEffectSimulation::BCContamination &bcCont : std::as_const(bcConts))
|
||||
{
|
||||
if (bcCont.externalId() == externalId)
|
||||
{
|
||||
@@ -132,7 +133,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
return AreaEffectSimulation::AesType_def::AtBCContamination;
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::NContamination> nConts = nContaminations();
|
||||
for (const AreaEffectSimulation::NContamination &nCont: qAsConst(nConts))
|
||||
for (const AreaEffectSimulation::NContamination &nCont: std::as_const(nConts))
|
||||
{
|
||||
if (nCont.externalId() == externalId)
|
||||
{
|
||||
@@ -144,7 +145,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
return AreaEffectSimulation::AesType_def::AtNContamination;
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::ExplosionArea> explAreas = explosionAreas();
|
||||
for (const AreaEffectSimulation::ExplosionArea &explArea : qAsConst(explAreas))
|
||||
for (const AreaEffectSimulation::ExplosionArea &explArea : std::as_const(explAreas))
|
||||
{
|
||||
if (explArea.externalId() == externalId)
|
||||
{
|
||||
@@ -156,7 +157,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
return AreaEffectSimulation::AesType_def::AtExplosionArea;
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::ExplosionSingle> explSingles = explosionSingles();
|
||||
for (const AreaEffectSimulation::ExplosionSingle &explSingle : qAsConst(explSingles))
|
||||
for (const AreaEffectSimulation::ExplosionSingle &explSingle : std::as_const(explSingles))
|
||||
{
|
||||
if (explSingle.externalId() == externalId)
|
||||
{
|
||||
@@ -168,7 +169,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
return AreaEffectSimulation::AesType_def::AtExplosionSingle;
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::MineArea> mAreas = mineAreas();
|
||||
for(const AreaEffectSimulation::MineArea &mArea : qAsConst(mAreas))
|
||||
for(const AreaEffectSimulation::MineArea &mArea : std::as_const(mAreas))
|
||||
{
|
||||
if (mArea.externalId() == externalId)
|
||||
{
|
||||
@@ -180,7 +181,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
return AreaEffectSimulation::AesType_def::AtMineArea;
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::MineCorridor> mCorridors = mineCorridors();
|
||||
for (const AreaEffectSimulation::MineCorridor &mCorridor : qAsConst(mCorridors))
|
||||
for (const AreaEffectSimulation::MineCorridor &mCorridor : std::as_const(mCorridors))
|
||||
{
|
||||
if (mCorridor.externalId() == externalId)
|
||||
{
|
||||
@@ -352,7 +353,7 @@ QVector<TrajectoryTimeAware> DtcImplCustom::trajectoriesTimeAwareFromOriginatorI
|
||||
|
||||
const QMap<qint32, AreaEffectSimulation::TrajectoryTimeAware> &trajectoryTimeAwareMap = trajectoryTimeAwares();
|
||||
|
||||
for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : qAsConst(trajectoryTimeAwareMap))
|
||||
for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : std::as_const(trajectoryTimeAwareMap))
|
||||
{
|
||||
// be aware of: [E01562-259] use originatorId, originatorTypeId (instead of aesItemId, aesTypeId)
|
||||
if ((trajectoryTimeAware.originatorId() == originatorId) &&
|
||||
@@ -401,7 +402,7 @@ void DtcImplCustom::initDAO()
|
||||
// // We don´t realy know, how many to reserve:
|
||||
// trajectoriesFromAesIdVec.reserve(120); // 2024-09 N.Thoden: 120 ist maximum per area
|
||||
|
||||
// for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : qAsConst(trajectoryTimeAwareMap))
|
||||
// for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : std::as_const(trajectoryTimeAwareMap))
|
||||
// {
|
||||
// if (trajectoryTimeAware.aesItemId() == aesId)
|
||||
// trajectoriesFromAesIdVec.push_back(trajectoryTimeAware);
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_air_support_impact.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
@@ -28,7 +29,7 @@ bool HandlerAirSupportImpact::init()
|
||||
}
|
||||
|
||||
// create air support impact objects
|
||||
for (const Database::AesAirSupportImpact &dbData : qAsConst(dataVec))
|
||||
for (const Database::AesAirSupportImpact &dbData : std::as_const(dataVec))
|
||||
{
|
||||
ObjectAirSupportImpact *ifs(new ObjectAirSupportImpact(m_mainHandler, this));
|
||||
connect(ifs, &ObjectAirSupportImpact::effectStateChanged, this, &HandlerAirSupportImpact::onEffectStateChanged);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "main_handler.h"
|
||||
#include <utility>
|
||||
#include "logger.h"
|
||||
|
||||
#include <QObject>
|
||||
@@ -132,7 +133,7 @@ public:
|
||||
{
|
||||
m_areaCount = 0;
|
||||
m_areaCountCentral = 0;
|
||||
for (const Obj *area : qAsConst(m_objectMap))
|
||||
for (const Obj *area : std::as_const(m_objectMap))
|
||||
{
|
||||
if (area->isObjectInTrainingArea()) // meanwhile an ugly name, means EsPrepared, EsActivated, EsPaused
|
||||
{
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_borderline.h"
|
||||
#include <utility>
|
||||
#include "object_borderline.h"
|
||||
|
||||
|
||||
@@ -47,13 +48,13 @@ bool HandlerBorderline::init()
|
||||
// contains all segments of an borderline in ascending order
|
||||
QVector<Database::AesBorderlineSegment> dbBorderlineSegments;
|
||||
|
||||
for (const Database::AesBorderline &dbBorderline : qAsConst(borderlineVec))
|
||||
for (const Database::AesBorderline &dbBorderline : std::as_const(borderlineVec))
|
||||
{
|
||||
if (dbBorderline.effectStateId == AesEffectState_def::EsRemoved)
|
||||
continue;
|
||||
|
||||
dbBorderlineSegments.clear();
|
||||
for (const Database::AesBorderlineSegment &segment : qAsConst(segmentVec))
|
||||
for (const Database::AesBorderlineSegment &segment : std::as_const(segmentVec))
|
||||
{
|
||||
if (segment.borderlineId == dbBorderline.privBorderlineId)
|
||||
dbBorderlineSegments.insert(segment.positionIndex, segment);
|
||||
|
||||
+5
-4
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_charge_administration.h"
|
||||
#include <utility>
|
||||
#include "object_charge_administration.h"
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
@@ -52,7 +53,7 @@ bool HandlerChargeAdministration::init()
|
||||
|
||||
int HandlerChargeAdministration::getObjectChargeAdministrationId(int partyId, int chargeTypeId, ProjectDataManagement::EffectSource effectSourceId)
|
||||
{
|
||||
for (ObjectChargeAdministration *val : qAsConst(m_chargeAdminObjMap))
|
||||
for (ObjectChargeAdministration *val : std::as_const(m_chargeAdminObjMap))
|
||||
{
|
||||
if (val->data().partyId == partyId && val->data().chargeTypeId == chargeTypeId && val->data().effectSourceId == effectSourceId)
|
||||
return val->id();
|
||||
@@ -117,7 +118,7 @@ Core::FunctionReplyObject HandlerChargeAdministration::chargeAdministrationModif
|
||||
|
||||
Core::FunctionReplyObject HandlerChargeAdministration::claimPlannedCharge(int chargeTypeId, int partyId, int count)
|
||||
{
|
||||
for (ObjectChargeAdministration *val : qAsConst(m_chargeAdminObjMap))
|
||||
for (ObjectChargeAdministration *val : std::as_const(m_chargeAdminObjMap))
|
||||
{
|
||||
if (val->data().partyId == partyId && val->data().chargeTypeId == chargeTypeId)
|
||||
return val->claimPlannedCharge(count);
|
||||
@@ -140,7 +141,7 @@ Core::FunctionReplyObject HandlerChargeAdministration::consumeCharge(int chargeT
|
||||
|
||||
DEBUG_LOG(m_logger) << "effectSource: " << effectSource;
|
||||
|
||||
for (ObjectChargeAdministration *val : qAsConst(m_chargeAdminObjMap))
|
||||
for (ObjectChargeAdministration *val : std::as_const(m_chargeAdminObjMap))
|
||||
{
|
||||
if (val->data().partyId == partyId && val->data().chargeTypeId == chargeTypeId && val->data().effectSourceId == effectSource)
|
||||
{
|
||||
@@ -155,7 +156,7 @@ Core::FunctionReplyObject HandlerChargeAdministration::consumeCharge(int chargeT
|
||||
|
||||
int HandlerChargeAdministration::availableCharge(int chargeTypeId, int partyId) const
|
||||
{
|
||||
for (ObjectChargeAdministration *val : qAsConst(m_chargeAdminObjMap))
|
||||
for (ObjectChargeAdministration *val : std::as_const(m_chargeAdminObjMap))
|
||||
{
|
||||
if (val->data().partyId == partyId && val->data().chargeTypeId == chargeTypeId)
|
||||
return val->availableCharge();
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
#include "handler_charge_effect.h"
|
||||
#include <utility>
|
||||
|
||||
#include "handler_charge_administration.h"
|
||||
#include "handler_effect_cluster.h"
|
||||
@@ -52,7 +53,7 @@ bool HandlerChargeEffect::init()
|
||||
|
||||
ObjectChargeEffect::s_afterglowMsecs = Settings::getChargeEffectAfterGlow();
|
||||
|
||||
for (const Database::AesChargeEffect ¤tChargeEffectData : qAsConst(chargeEffectDbData))
|
||||
for (const Database::AesChargeEffect ¤tChargeEffectData : std::as_const(chargeEffectDbData))
|
||||
{
|
||||
ObjectChargeEffect *newChargeEffect = new ObjectChargeEffect(currentChargeEffectData, m_mainHandler, this);
|
||||
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_danger_area.h"
|
||||
#include <utility>
|
||||
#include "object_danger_area.h"
|
||||
|
||||
#include <TrainingAreaBase/tab_dtc.h>
|
||||
@@ -42,11 +43,11 @@ bool HandlerDangerArea::init()
|
||||
|
||||
// create area mine objects
|
||||
QVector<Database::AesDangerSegment> mySegments;
|
||||
for (const Database::AesDangerArea &area : qAsConst(areaVec))
|
||||
for (const Database::AesDangerArea &area : std::as_const(areaVec))
|
||||
{
|
||||
// Gather segments
|
||||
mySegments.clear();
|
||||
for (const Database::AesDangerSegment &mas : qAsConst(segmentVec))
|
||||
for (const Database::AesDangerSegment &mas : std::as_const(segmentVec))
|
||||
{
|
||||
if (mas.dangerAreaId == area.privDangerAreaId)
|
||||
mySegments << mas;
|
||||
|
||||
+8
-7
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_effect_cluster.h"
|
||||
#include <utility>
|
||||
#include "handler_charge_administration.h"
|
||||
#include "object_effect_cluster.h"
|
||||
#include "settings.h"
|
||||
@@ -632,7 +633,7 @@ Core::FunctionReplyObject HandlerEffectCluster::effectClusterModifyRequest(const
|
||||
void HandlerEffectCluster::recountActiveAreas()
|
||||
{
|
||||
s_currentAirSupportCount = 0;
|
||||
for (const auto *area : qAsConst(m_objectMap))
|
||||
for (const auto *area : std::as_const(m_objectMap))
|
||||
{
|
||||
if (area->isObjectInTrainingArea()) // meanwhile an ugly name, means EsPrepared, EsActivated, EsPaused
|
||||
{
|
||||
@@ -681,7 +682,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
|
||||
|
||||
QMap<int, ObjectEffectCluster *> effectClusterPartyMap;
|
||||
|
||||
for (const auto *area : qAsConst(m_objectMap))
|
||||
for (const auto *area : std::as_const(m_objectMap))
|
||||
{
|
||||
if (area->data().partyId == request.partyId())
|
||||
{
|
||||
@@ -701,7 +702,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
|
||||
case ProjectDataManagement::L22_FireHaltCategory::A: // Feuer Halt Allgemein
|
||||
{
|
||||
// all control operations are halted
|
||||
for (auto *ifs : qAsConst(effectClusterPartyMap))
|
||||
for (auto *ifs : std::as_const(effectClusterPartyMap))
|
||||
{
|
||||
EffectClusterPauseResumeRequest req;
|
||||
|
||||
@@ -718,7 +719,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
|
||||
{
|
||||
// Ongoing combat operations are halted after comparing the extent of
|
||||
// the fire hold with the corresponding target coordinate and circular area.
|
||||
for (auto *ifs : qAsConst(effectClusterPartyMap))
|
||||
for (auto *ifs : std::as_const(effectClusterPartyMap))
|
||||
{
|
||||
const double lonRad = request.longitude().is_set() ? request.longitude().get() * LtsCoordTrans::deg2rad() : 0.0;
|
||||
const double latRad = request.latitude().is_set() ? request.latitude().get() * LtsCoordTrans::deg2rad() : 0.0;
|
||||
@@ -746,7 +747,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
|
||||
// Unlike "Check Fire" (Feuer Halt), any rounds already loaded in a Panzerhaubitze (PzH) are still fired,
|
||||
// followed by an EX-FQ(FN) report. Once the weapon system confirms execution,
|
||||
// the engagement is closed and the target area status is set to "expired."
|
||||
for (auto *ifs : qAsConst(effectClusterPartyMap))
|
||||
for (auto *ifs : std::as_const(effectClusterPartyMap))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "[Feuer Einstellen ----- markAsExpired] " << "effectClusterId: " << ifs->data().id;
|
||||
|
||||
@@ -755,7 +756,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
|
||||
break;
|
||||
}
|
||||
case ProjectDataManagement::L22_FireHaltCategory::C: // Aufheben Feuer Halt Allgemein
|
||||
for (auto *ifs : qAsConst(effectClusterPartyMap))
|
||||
for (auto *ifs : std::as_const(effectClusterPartyMap))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "[Aufheben Feuer Halt Allgemein] " << "effectClusterId: " << ifs->data().id;
|
||||
|
||||
@@ -768,7 +769,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
|
||||
break;
|
||||
case ProjectDataManagement::L22_FireHaltCategory::F: // Aufheben Feuer Halt Referenziert
|
||||
{
|
||||
for (auto *ifs : qAsConst(effectClusterPartyMap))
|
||||
for (auto *ifs : std::as_const(effectClusterPartyMap))
|
||||
{
|
||||
const double lonRad = request.longitude().is_set() ? request.longitude().get() * LtsCoordTrans::deg2rad() : 0.0; // optional<lonRad>
|
||||
const double latRad = request.latitude().is_set() ? request.latitude().get() * LtsCoordTrans::deg2rad() : 0.0; // optional <latRad>
|
||||
|
||||
+2
-1
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_explosion_cluster.h"
|
||||
#include <utility>
|
||||
#include "handler_charge_administration.h"
|
||||
#include <Services/AreaEffectSimulation/Utils/polygons.h>
|
||||
#include <ProjectDataManagement/pdm_translation.h>
|
||||
@@ -611,7 +612,7 @@ Core::FunctionReplyObject HandlerExplosionCluster::modifyPartyParticipant(qint32
|
||||
void HandlerExplosionCluster::recountActiveAreas()
|
||||
{
|
||||
s_currentAirSupportCount = 0;
|
||||
for (const auto *area : qAsConst(m_objectMap))
|
||||
for (const auto *area : std::as_const(m_objectMap))
|
||||
{
|
||||
if (area->isObjectInTrainingArea()) // meanwhile an ugly name, means EsPrepared, EsActivated, EsPaused
|
||||
{
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_explosion_single.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
#include <Services/AreaEffectSimulation/Utils/polygons.h>
|
||||
|
||||
@@ -30,7 +31,7 @@ bool HandlerExplosionSingle::init()
|
||||
return true;
|
||||
}
|
||||
// create indirect fire single objects
|
||||
for (const Database::AesExplosionSingle &dbData : qAsConst(dataVec))
|
||||
for (const Database::AesExplosionSingle &dbData : std::as_const(dataVec))
|
||||
{
|
||||
ObjectExplosionSingle *ifs(new ObjectExplosionSingle(m_mainHandler, this));
|
||||
connect(ifs, &ObjectExplosionSingle::effectStateChanged, this, &HandlerExplosionSingle::onEffectStateChanged);
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_functional_area.h"
|
||||
#include <utility>
|
||||
#include "Utils/polygons.h"
|
||||
|
||||
#include <QPolygonF>
|
||||
@@ -51,7 +52,7 @@ bool HandlerFunctionalArea::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const Database::AesFunctionalAreaType ¤tFunctionalAreaType : qAsConst(functionalAreaTypeVec))
|
||||
for (const Database::AesFunctionalAreaType ¤tFunctionalAreaType : std::as_const(functionalAreaTypeVec))
|
||||
{
|
||||
|
||||
FunctionalAreaType *ddsData = new FunctionalAreaType(currentFunctionalAreaType.id,
|
||||
@@ -74,7 +75,7 @@ bool HandlerFunctionalArea::init()
|
||||
|
||||
|
||||
// create functional area objects
|
||||
for (const Database::AesFunctionalArea &dbData : qAsConst(dataVec))
|
||||
for (const Database::AesFunctionalArea &dbData : std::as_const(dataVec))
|
||||
{
|
||||
ObjectFunctionalArea *ifs(new ObjectFunctionalArea(m_mainHandler, this));
|
||||
connect(ifs, &ObjectFunctionalArea::effectStateChanged, this, &HandlerFunctionalArea::onEffectStateChanged);
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_gas_pipe.h"
|
||||
#include <utility>
|
||||
#include "object_gas_pipe.h"
|
||||
#include <QTimer>
|
||||
#include "Utils/polygons.h"
|
||||
@@ -50,13 +51,13 @@ bool HandlerGasPipe::init()
|
||||
// contains all segments of an gasPipe in ascending order
|
||||
QVector<Database::AesGasPipeSegment> dbGasPipeSegments;
|
||||
|
||||
for (const Database::AesGasPipe &dbGasPipe : qAsConst(gasPipeVec))
|
||||
for (const Database::AesGasPipe &dbGasPipe : std::as_const(gasPipeVec))
|
||||
{
|
||||
if (dbGasPipe.effectStateId == AesEffectState_def::EsRemoved)
|
||||
continue;
|
||||
|
||||
dbGasPipeSegments.clear();
|
||||
for (const Database::AesGasPipeSegment &segment : qAsConst(segmentVec))
|
||||
for (const Database::AesGasPipeSegment &segment : std::as_const(segmentVec))
|
||||
{
|
||||
if (segment.gasPipeId == dbGasPipe.privGasPipeId)
|
||||
dbGasPipeSegments.insert(segment.positionIndex, segment);
|
||||
|
||||
+10
-9
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_mine_area.h"
|
||||
#include <utility>
|
||||
#include "Utils/polygons.h"
|
||||
#include "handler_effect_cluster.h"
|
||||
#include "handler_mine_corridor.h"
|
||||
@@ -69,7 +70,7 @@ bool HandlerMineArea::init()
|
||||
}
|
||||
|
||||
// create area mine objects
|
||||
for (const Database::AesMineArea &area : qAsConst(areaVec))
|
||||
for (const Database::AesMineArea &area : std::as_const(areaVec))
|
||||
{
|
||||
|
||||
if (area.layingProcedureTypeId == AesMaLayingProcedureType::LptArtillery && !area.isCentral
|
||||
@@ -159,7 +160,7 @@ void HandlerMineArea::redistributeMines(int aesId, QList<Database::AesMineAreaTr
|
||||
DEBUG_LOG(m_logger) << "Putting mines from " << aesId << " into other MineAreas if applicable or in NullArea.";
|
||||
|
||||
// check if any other MineArea will handle some of the mines
|
||||
for (const auto &mineArea : qAsConst(m_objectMap))
|
||||
for (const auto &mineArea : std::as_const(m_objectMap))
|
||||
{
|
||||
if (mineArea->id() != aesId)
|
||||
{
|
||||
@@ -185,7 +186,7 @@ void HandlerMineArea::redistributeMines(int aesId, QList<Database::AesMineAreaTr
|
||||
|
||||
bool HandlerMineArea::removeDuplicateMine(int mineId)
|
||||
{
|
||||
for (const auto &mineArea : qAsConst(m_objectMap))
|
||||
for (const auto &mineArea : std::as_const(m_objectMap))
|
||||
{
|
||||
if (mineArea->isDusMineArea() && mineArea->hasMine(mineId))
|
||||
{
|
||||
@@ -621,7 +622,7 @@ Core::FunctionReplyObject HandlerMineArea::mineResetRequest(const MineResetReque
|
||||
DEBUG_LOG(m_logger) << "Resetting all unassociated DUS mines (NullArea) and all DUS mine areas";
|
||||
// Do this first!
|
||||
m_nullArea->resetMines();
|
||||
for (auto mineAreaObj : qAsConst(m_objectMap))
|
||||
for (auto mineAreaObj : std::as_const(m_objectMap))
|
||||
{
|
||||
if (!mineAreaObj->isDusMineArea() && !mineAreaObj->isConcreteMine())
|
||||
continue;
|
||||
@@ -805,7 +806,7 @@ void HandlerMineArea::onNewMineCorridor(const AesItemView &aiv)
|
||||
if (aiv.effectStateId() != AesEffectState::EsActivated)
|
||||
return;
|
||||
|
||||
for (ObjectMineArea *ma : qAsConst(m_objectMap))
|
||||
for (ObjectMineArea *ma : std::as_const(m_objectMap))
|
||||
{
|
||||
if (intersects(ma->boundingRect(), aiv.form()))
|
||||
ma->clearCorridor(aiv);
|
||||
@@ -1183,7 +1184,7 @@ void HandlerMineArea::onTimeoutEquipNo(int equipNo, int chargeTypeId)
|
||||
|
||||
std::vector<Core::GeoPosition2D> vec;
|
||||
vec.reserve(points.size());
|
||||
for (QPointF bbPoint : qAsConst(points))
|
||||
for (QPointF bbPoint : std::as_const(points))
|
||||
{
|
||||
Core::GeoPosition2D pos;
|
||||
pos.lon(bbPoint.x());
|
||||
@@ -1192,7 +1193,7 @@ void HandlerMineArea::onTimeoutEquipNo(int equipNo, int chargeTypeId)
|
||||
vec.push_back(pos);
|
||||
}
|
||||
// vec.reserve(boundingBox.size());
|
||||
// for( QPointF bbPoint : qAsConst(boundingBox))
|
||||
// for( QPointF bbPoint : std::as_const(boundingBox))
|
||||
// {
|
||||
// Core::GeoPosition2D pos;
|
||||
// LtsCoordTrans::UtmCoordinate utm;
|
||||
@@ -1259,7 +1260,7 @@ bool HandlerMineArea::checkIfNullMineIsInArea(const std::vector<AreaEffectSimula
|
||||
QVector<Database::AesMineAreaSegment> vecSeg;
|
||||
vecSeg.reserve(segments.size());
|
||||
|
||||
for (const AreaEffectSimulation::MineSegment &seg : qAsConst(segments))
|
||||
for (const AreaEffectSimulation::MineSegment &seg : std::as_const(segments))
|
||||
{
|
||||
Database::AesMineAreaSegment dbSeg;
|
||||
dbSeg.startPosition = QPointF(seg.positionStart().lon(), seg.positionStart().lat());
|
||||
@@ -1303,7 +1304,7 @@ bool HandlerMineArea::containsPointInExpandedMinefield(const QPointF &positionGe
|
||||
mineAreaPolygonUtm.push_back(QPointF(pointMineAreaUtm.x, pointMineAreaUtm.y));
|
||||
}
|
||||
|
||||
for (const QPointF &mineAreaPointUTM : qAsConst(mineAreaPolygonUtm))
|
||||
for (const QPointF &mineAreaPointUTM : std::as_const(mineAreaPolygonUtm))
|
||||
{
|
||||
|
||||
double x = pointUtm.x - mineAreaPointUTM.x();
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_mine_corridor.h"
|
||||
#include <utility>
|
||||
#include "object_mine_corridor.h"
|
||||
#include "mine_corridor_creator.h"
|
||||
|
||||
@@ -47,11 +48,11 @@ bool HandlerMineCorridor::init()
|
||||
|
||||
// create area mine objects
|
||||
QVector<Database::AesMineCorridorSegment> mySegments;
|
||||
for (const Database::AesMineCorridor &area : qAsConst(areaVec))
|
||||
for (const Database::AesMineCorridor &area : std::as_const(areaVec))
|
||||
{
|
||||
// Gather segments
|
||||
mySegments.clear();
|
||||
for (const Database::AesMineCorridorSegment &mas : qAsConst(segmentVec))
|
||||
for (const Database::AesMineCorridorSegment &mas : std::as_const(segmentVec))
|
||||
{
|
||||
if (mas.mineCorridorId == area.id)
|
||||
mySegments << mas;
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_ncontamination.h"
|
||||
#include <utility>
|
||||
#include "Utils/polygons.h"
|
||||
|
||||
#include <QPolygonF>
|
||||
@@ -33,7 +34,7 @@ bool HandlerNContamination::init()
|
||||
|
||||
DEBUG_LOG(m_logger) << "TotalC: " << totalAreasCentral() << " Total: " << totalAreas();
|
||||
|
||||
for (const Database::AesNContamination &dbData : qAsConst(dataVec))
|
||||
for (const Database::AesNContamination &dbData : std::as_const(dataVec))
|
||||
{
|
||||
ObjectNContamination *ifs(new ObjectNContamination(m_mainHandler, this));
|
||||
connect(ifs, &ObjectNContamination::effectStateChanged, this, &HandlerNContamination::onEffectStateChanged);
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_recon_area.h"
|
||||
#include <utility>
|
||||
#include <Services/AreaEffectSimulation/Utils/polygons.h>
|
||||
#include <QPolygonF>
|
||||
|
||||
@@ -31,7 +32,7 @@ bool HandlerReconArea::init()
|
||||
}
|
||||
|
||||
// create Recon area objects
|
||||
for (const Database::AesReconArea &dbData : qAsConst(dataVec))
|
||||
for (const Database::AesReconArea &dbData : std::as_const(dataVec))
|
||||
{
|
||||
ObjectReconArea *ifs(new ObjectReconArea(m_mainHandler, this));
|
||||
connect(ifs, &ObjectReconArea::effectStateChanged, this, &HandlerReconArea::onEffectStateChanged);
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_technical_area.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QPolygonF>
|
||||
|
||||
@@ -31,7 +32,7 @@ bool HandlerTechnicalArea::init()
|
||||
}
|
||||
|
||||
// create Technical area objects
|
||||
for (const Database::AesTechnicalArea &dbData : qAsConst(dataVec))
|
||||
for (const Database::AesTechnicalArea &dbData : std::as_const(dataVec))
|
||||
{
|
||||
ObjectTechnicalArea *ifs(new ObjectTechnicalArea(m_mainHandler, this));
|
||||
connect(ifs, &ObjectTechnicalArea::effectStateChanged, this, &HandlerTechnicalArea::onEffectStateChanged);
|
||||
|
||||
+3
-2
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "meteo_data_provider.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include "settings.h"
|
||||
@@ -55,7 +56,7 @@ MeteoDataManagement::MeteoData MeteoDataProvider::getNearestWeather(const Core::
|
||||
LtsCoordTrans::UtmCoordinate utm(LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon(), pos.lat()));
|
||||
double nearestDistanceSquared = std::numeric_limits<double>::max();
|
||||
MeteoDataManagement::MeteoData retMd;
|
||||
for (const auto &md : qAsConst(m_meteoData))
|
||||
for (const auto &md : std::as_const(m_meteoData))
|
||||
{
|
||||
if (md.isStaticMeteoData())
|
||||
continue;
|
||||
@@ -95,7 +96,7 @@ void MeteoDataProvider::initWeatherData()
|
||||
return;
|
||||
m_mdmDtc->waitForHistoricalDataMeteoData();
|
||||
m_meteoData = m_mdmDtc->meteoDatas();
|
||||
for (const auto &data : qAsConst(m_meteoData))
|
||||
for (const auto &data : std::as_const(m_meteoData))
|
||||
if (data.isStaticMeteoData())
|
||||
{
|
||||
m_staticWeatherId = data.id();
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "mine_corridor_creator.h"
|
||||
#include <utility>
|
||||
#include "object_mine_corridor.h"
|
||||
|
||||
#include <TrainingAreaBase/tab_dtc.h>
|
||||
@@ -97,7 +98,7 @@ void MineCorridorCreator::checkCorridorData(bool bFinished)
|
||||
DEBUG_LOG(m_logger) << "Checking corridor data (finished: " << bFinished << ") for equipment " << m_equipNo;
|
||||
std::vector<LtsCoordTrans::UtmCoordinate> coords;
|
||||
coords.reserve(m_sortedCorridorData.size());
|
||||
for (const auto &c : qAsConst(m_sortedCorridorData))
|
||||
for (const auto &c : std::as_const(m_sortedCorridorData))
|
||||
coords.push_back(c);
|
||||
const auto coordsSmoothed = ramerDouglasPeucker(coords, s_smoothDistance);
|
||||
DEBUG_LOG(m_logger) << "Calculated points:";
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <utility>
|
||||
#include <QPolygonF>
|
||||
#include <QTimer>
|
||||
|
||||
@@ -148,7 +149,7 @@ class ObjectBase : public QObject
|
||||
{
|
||||
QPolygonF out;
|
||||
out.reserve(in.size());
|
||||
for (const auto &pos : qAsConst(in))
|
||||
for (const auto &pos : std::as_const(in))
|
||||
out.push_back(QPointF(pos.lon(), pos.lat()));
|
||||
|
||||
return out;
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "object_borderline.h"
|
||||
#include <utility>
|
||||
#include "special_area_provider.h"
|
||||
|
||||
#include <QPolygonF>
|
||||
@@ -125,7 +126,7 @@ Core::FunctionReplyObject ObjectBorderline::updateObject(const Database::AesBord
|
||||
}
|
||||
|
||||
// update all AesBorderlineSegments in database
|
||||
for (const Database::AesBorderlineSegment &segment : qAsConst(tmpDbSegments))
|
||||
for (const Database::AesBorderlineSegment &segment : std::as_const(tmpDbSegments))
|
||||
{
|
||||
if (!m_mainHandler->db()->update(segment))
|
||||
return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating AesBorderlineSegment-data in database."));
|
||||
|
||||
+4
-3
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "object_danger_area.h"
|
||||
#include <utility>
|
||||
#include "special_area_provider.h"
|
||||
|
||||
#include "Utils/polygons.h"
|
||||
@@ -130,7 +131,7 @@ Core::FunctionReplyObject ObjectDangerArea::updateObject(const Database::AesDang
|
||||
for (size_t i = 0; i < segments.size(); ++i)
|
||||
tmpSegments[i].position = QPointF(segments[i].lon(), segments[i].lat());
|
||||
|
||||
for (const Database::AesDangerSegment &segment : qAsConst(tmpSegments))
|
||||
for (const Database::AesDangerSegment &segment : std::as_const(tmpSegments))
|
||||
{
|
||||
if (!m_mainHandler->db()->update(segment))
|
||||
return Core::FunctionReplyObject(data.id, tr_lts("dds", "Error updating AesDangerSegment-data in database."));
|
||||
@@ -241,7 +242,7 @@ void ObjectDangerArea::removeTopics()
|
||||
auto dts = m_mainHandler->dds()->dts();
|
||||
dts->removeDangerAreaByKey(m_data.id);
|
||||
dts->removeAesItemViewByKey(1000 * m_data.id + AesType::inner_enum::AtDangerArea);
|
||||
for (int idx : qAsConst(m_correlatedAesItems))
|
||||
for (int idx : std::as_const(m_correlatedAesItems))
|
||||
dts->removeDangerAreaCorrelatedAesItemByKey(idForCorrelatedItem(idx));
|
||||
m_correlatedAesItems.clear();
|
||||
emit removeAiv(m_data.id);
|
||||
@@ -254,7 +255,7 @@ void ObjectDangerArea::onUpdateCorrelation()
|
||||
// If Danger Area is not active, remove correlations and return
|
||||
if (effectState() != AesEffectState::EsActivated)
|
||||
{
|
||||
for(int oldItem : qAsConst(m_correlatedAesItems))
|
||||
for(int oldItem : std::as_const(m_correlatedAesItems))
|
||||
m_mainHandler->dds()->dts()->removeDangerAreaCorrelatedAesItemByKey(idForCorrelatedItem(oldItem));
|
||||
m_correlatedAesItems.clear();
|
||||
return;
|
||||
|
||||
+11
-10
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "object_effect_cluster.h"
|
||||
#include <utility>
|
||||
#include "Utils/polygons.h"
|
||||
#include "handler_charge_administration.h"
|
||||
#include "handler_charge_effect.h"
|
||||
@@ -461,9 +462,9 @@ Core::FunctionReplyObject ObjectEffectCluster::updateObject(const Database::AesE
|
||||
|
||||
int oldImpactCount = 0;
|
||||
int newImpactCount = 0;
|
||||
for (const auto &oldEffector : qAsConst(m_effectorData))
|
||||
for (const auto &oldEffector : std::as_const(m_effectorData))
|
||||
oldImpactCount += oldEffector.chargeAmount;
|
||||
for (const auto &newEffector : qAsConst(effectorDatas))
|
||||
for (const auto &newEffector : std::as_const(effectorDatas))
|
||||
newImpactCount += newEffector.chargeAmount;
|
||||
|
||||
if (oldImpactCount != newImpactCount)
|
||||
@@ -686,7 +687,7 @@ bool ObjectEffectCluster::initialCalculations(QString *reasonOut)
|
||||
mtps_asUtm.resize(m_data.impactCount);
|
||||
|
||||
m_temporaryData.mhPoints.reserve(mtps_asUtm.size());
|
||||
for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm))
|
||||
for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm))
|
||||
{
|
||||
LtsCoordTrans::UtmCoordinate temp(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y());
|
||||
m_temporaryData.mhPoints.emplace_back(Core::GeoPosition2D(temp.geographic().x(), temp.geographic().y()));
|
||||
@@ -1435,7 +1436,7 @@ void ObjectEffectCluster::publishAiv()
|
||||
const QVector<QPointF> &singleExplosions = Polygons::effectClusterSingleExplosionsGAUSS_Mtp(m_data, m_effectorData);
|
||||
|
||||
singleEffectsRef.reserve(singleExplosions.size());
|
||||
for (const QPointF &singleExplosion : qAsConst(singleExplosions))
|
||||
for (const QPointF &singleExplosion : std::as_const(singleExplosions))
|
||||
{
|
||||
SingleEffect se;
|
||||
se.singleEffectState(AesSingleEffectState_def::SesScheduled);
|
||||
@@ -1616,7 +1617,7 @@ void ObjectEffectCluster::markAsExpired(bool fireLoadedRound)
|
||||
DEBUG_LOG(m_logger) << "TimerTimeout we will now send Confirmation for " << m_data.id;
|
||||
|
||||
// send confirmation for all Effectors then mark as expired (with false)
|
||||
for (const auto effector : qAsConst(m_effectorData))
|
||||
for (const auto effector : std::as_const(m_effectorData))
|
||||
{
|
||||
onSendConfirmationReportToTab(effector.participantId);
|
||||
}
|
||||
@@ -2036,7 +2037,7 @@ void ObjectEffectCluster::onEffectorFired(int participantId, int aesItemId, cons
|
||||
|
||||
if (chargeEffectIds.size() > 1) // we need to find the last and first one
|
||||
{
|
||||
for (const auto id : qAsConst(chargeEffectIds))
|
||||
for (const auto id : std::as_const(chargeEffectIds))
|
||||
{
|
||||
const auto &chargeEffect = m_mainHandler->chargeEffectHandler()->getChargeEffectById(id);
|
||||
if (chargeEffect->getEffectStart() > lastChargeEffect.second)
|
||||
@@ -2547,7 +2548,7 @@ bool ObjectEffectCluster::generateTrajectoryVulcanoSpecific(int explosionNumber,
|
||||
|
||||
// "convert" from time-aware curve 'back' to time-unaware trajectoryGeometry
|
||||
tdRef.trajectoryGeometry.clear();
|
||||
for (const Core::GeoPositionRelativeTime &geoPosRelTime : qAsConst(tdRef.trajectoryTimeAware.geometry()))
|
||||
for (const Core::GeoPositionRelativeTime &geoPosRelTime : std::as_const(tdRef.trajectoryTimeAware.geometry()))
|
||||
tdRef.trajectoryGeometry.emplace_back(geoPosRelTime); // implicit // downcast
|
||||
|
||||
tdRef.peakHeightAbs = peakHeightRelToOrigin + originatorPosition_geo.z();
|
||||
@@ -2722,7 +2723,7 @@ void ObjectEffectCluster::sendCalculateTrajectoryAdlerRequest(const QVector<Data
|
||||
|
||||
QString reason;
|
||||
|
||||
for (const auto &data : qAsConst(effectorData))
|
||||
for (const auto &data : std::as_const(effectorData))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "TRY to send Calcualte TrajecotryAdlerReuqest for participantId=" << data.participantId;
|
||||
|
||||
@@ -3048,7 +3049,7 @@ void ObjectEffectCluster::publishTrajectory(int explosionIndex)
|
||||
#define REDUCED_DISTRIBUTION // [GUEZE-2462] Darstellung Flugparabel Steilfeuer
|
||||
#ifdef REDUCED_DISTRIBUTION
|
||||
const int trajSize = trajectoryGeometry.size();
|
||||
for (const Core::GeoPosition &pos3D : qAsConst(trajectoryGeometry))
|
||||
for (const Core::GeoPosition &pos3D : std::as_const(trajectoryGeometry))
|
||||
{
|
||||
// if (!m_isAirSupportSource)
|
||||
{
|
||||
@@ -3076,7 +3077,7 @@ void ObjectEffectCluster::publishTrajectory(int explosionIndex)
|
||||
} // for
|
||||
|
||||
#else
|
||||
for (const Core::GeoPosition &pos3D : qAsConst(trajectoryGeometry))
|
||||
for (const Core::GeoPosition &pos3D : std::as_const(trajectoryGeometry))
|
||||
{
|
||||
geometryRef.emplace_back(Core::GeoPositionRelativeTime(pos3D.lon(), pos3D.lat(), pos3D.z(), idx * flightDurationMSecSeg));
|
||||
++idx;
|
||||
|
||||
+9
-8
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "object_explosion_cluster.h"
|
||||
#include <utility>
|
||||
#include "Utils/polygons.h"
|
||||
#include "handler_charge_administration.h"
|
||||
#include "handler_trajectory.h"
|
||||
@@ -299,7 +300,7 @@ Core::FunctionReplyObject ObjectExplosionCluster::createObject(const Database::A
|
||||
// DEBUG_LOG(m_logger) << "data.damagePercent() > 80. Check, if m_trajectoryCont contains building:" << data.id()
|
||||
// << " aesItemId=" << m_aiv.aesItemId();
|
||||
|
||||
// for (const TracjectoryData &tracjectoryData : qAsConst(m_trajectoryCont))
|
||||
// for (const TracjectoryData &tracjectoryData : std::as_const(m_trajectoryCont))
|
||||
// {
|
||||
// DEBUG_LOG(m_logger) << "print_m_trajectory"
|
||||
// << " value: index=" << tracjectoryData.index
|
||||
@@ -514,7 +515,7 @@ bool ObjectExplosionCluster::initialCalculations(QString *reasonOut)
|
||||
mtps_asUtm.resize(m_data.impactCount);
|
||||
|
||||
m_temporaryData.mhPoints.reserve(mtps_asUtm.size());
|
||||
for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm))
|
||||
for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm))
|
||||
{
|
||||
LtsCoordTrans::UtmCoordinate temp(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y());
|
||||
m_temporaryData.mhPoints.emplace_back(Core::GeoPosition2D(temp.geographic().x(), temp.geographic().y()));
|
||||
@@ -1515,7 +1516,7 @@ void ObjectExplosionCluster::publishAiv()
|
||||
int explosionIndex = 0;
|
||||
|
||||
singleEffectsRef.reserve(singleExplosions.size());
|
||||
for (const QPointF &singleExplosion : qAsConst(singleExplosions))
|
||||
for (const QPointF &singleExplosion : std::as_const(singleExplosions))
|
||||
{
|
||||
SingleEffect se;
|
||||
se.singleEffectState(AesSingleEffectState_def::SesScheduled);
|
||||
@@ -1652,7 +1653,7 @@ void ObjectExplosionCluster::removeTopics()
|
||||
#ifdef USE_TRAJECTORY_VIA_HANDLER
|
||||
// remove TrajectoryTimeAware created via Handler:
|
||||
// topicIds are stored at m_trajectoryHandlerExplosionIndexToTopicId
|
||||
for (int topicId : qAsConst(m_trajectoryHandlerExplosionIndexToTopicId))
|
||||
for (int topicId : std::as_const(m_trajectoryHandlerExplosionIndexToTopicId))
|
||||
{
|
||||
dts->removeTrajectoryTimeAwareByKey(topicId);
|
||||
}
|
||||
@@ -2478,7 +2479,7 @@ bool ObjectExplosionCluster::generateTrajectoryVulcanoSpecific(int explosionNumb
|
||||
|
||||
// "convert" from time-aware curve 'back' to time-unaware trajectoryGeometry
|
||||
tdRef.trajectoryGeometry.clear();
|
||||
for (const Core::GeoPositionRelativeTime &geoPosRelTime : qAsConst(tdRef.trajectoryTimeAware.geometry()))
|
||||
for (const Core::GeoPositionRelativeTime &geoPosRelTime : std::as_const(tdRef.trajectoryTimeAware.geometry()))
|
||||
tdRef.trajectoryGeometry.emplace_back(geoPosRelTime); // implicit // downcast
|
||||
|
||||
tdRef.peakHeightAbs = peakHeightRelToOrigin + originatorPosition_geo.z();
|
||||
@@ -2749,7 +2750,7 @@ void ObjectExplosionCluster::publishTrajectory(int explosionIndex)
|
||||
#define REDUCED_DISTRIBUTION // [GUEZE-2462] Darstellung Flugparabel Steilfeuer
|
||||
#ifdef REDUCED_DISTRIBUTION
|
||||
const int trajSize = trajectoryGeometry.size();
|
||||
for (const Core::GeoPosition &pos3D : qAsConst(trajectoryGeometry))
|
||||
for (const Core::GeoPosition &pos3D : std::as_const(trajectoryGeometry))
|
||||
{
|
||||
// if (!m_isAirSupportSource)
|
||||
{
|
||||
@@ -2777,7 +2778,7 @@ void ObjectExplosionCluster::publishTrajectory(int explosionIndex)
|
||||
} // for
|
||||
|
||||
#else
|
||||
for (const Core::GeoPosition &pos3D : qAsConst(trajectoryGeometry))
|
||||
for (const Core::GeoPosition &pos3D : std::as_const(trajectoryGeometry))
|
||||
{
|
||||
geometryRef.emplace_back(Core::GeoPositionRelativeTime(pos3D.lon(), pos3D.lat(), pos3D.z(), idx * flightDurationMSecSeg));
|
||||
++idx;
|
||||
@@ -2930,7 +2931,7 @@ void ObjectExplosionCluster::dump(const char *file, int lineNo) const
|
||||
DEBUG_LOG(m_logger) << m_data.id << ", DUMP: m_trajectoryCont.keys()= " << trajectoryContKeys;
|
||||
|
||||
DEBUG_LOG(m_logger) << m_data.id << ", DUMP: m_publisedTrajectoriesForDebug.size = " << m_publisedTrajectoriesForDebug.size();
|
||||
for (const auto &item : qAsConst(m_publisedTrajectoriesForDebug))
|
||||
for (const auto &item : std::as_const(m_publisedTrajectoriesForDebug))
|
||||
DEBUG_LOG(m_logger) << m_data.id << ", DUMP: m_publisedTrajectoriesForDebug = " << item;
|
||||
|
||||
DEBUG_LOG(m_logger) << "END ******* DUMP: id = " << m_data.id << ", name = '" << m_data.name << "' **************";
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "object_gas_pipe.h"
|
||||
#include <utility>
|
||||
#include "special_area_provider.h"
|
||||
|
||||
#include <QPolygonF>
|
||||
@@ -133,7 +134,7 @@ Core::FunctionReplyObject ObjectGasPipe::updateObject(const Database::AesGasPipe
|
||||
}
|
||||
|
||||
// update all AesGasPipeSegments in database
|
||||
for (const Database::AesGasPipeSegment &segment : qAsConst(tmpDbSegments))
|
||||
for (const Database::AesGasPipeSegment &segment : std::as_const(tmpDbSegments))
|
||||
{
|
||||
if (!m_mainHandler->db()->update(segment))
|
||||
return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating AesGasPipeSegment-data in database."));
|
||||
|
||||
+17
-16
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "object_mine_area.h"
|
||||
#include <utility>
|
||||
#include "handler_mine_area.h"
|
||||
#include "qtransform.h"
|
||||
#include "special_area_provider.h"
|
||||
@@ -116,7 +117,7 @@ int ObjectMineArea::getMineIdByIndex(int index) const
|
||||
|
||||
DEBUG_LOG(m_logger) << "getMineIdByIndex index: " << index;
|
||||
int count = 0;
|
||||
for (const Database::AesMineAreaTriggeredMines &tm : qAsConst(m_triggeredMines))
|
||||
for (const Database::AesMineAreaTriggeredMines &tm : std::as_const(m_triggeredMines))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "tm: mineId: " << tm.mineId;
|
||||
if (count == index)
|
||||
@@ -150,7 +151,7 @@ void ObjectMineArea::clearCorridor(const AesItemView &aiv)
|
||||
|
||||
QVector<int> minesToTrigger;
|
||||
minesToTrigger.reserve(m_triggeredMines.size());
|
||||
for (const Database::AesMineAreaTriggeredMines &tm : qAsConst(m_triggeredMines))
|
||||
for (const Database::AesMineAreaTriggeredMines &tm : std::as_const(m_triggeredMines))
|
||||
{
|
||||
LtsCoordTrans::UtmCoordinate utmMinePos = LtsCoordTrans::UtmCoordinate::fromGeographic(tm.position, zone);
|
||||
if (aivUtmPoly.containsPoint(QPointF(utmMinePos.x, utmMinePos.y), Qt::OddEvenFill))
|
||||
@@ -170,14 +171,14 @@ void ObjectMineArea::clearBuildings()
|
||||
|
||||
DEBUG_LOG(m_logger) << "mseIds size: " << mseIds.size();
|
||||
QVector<int> minesToTrigger;
|
||||
for (int mseId : qAsConst(mseIds))
|
||||
for (int mseId : std::as_const(mseIds))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "mseId: " << mseId;
|
||||
const QPolygonF &footprint = m_mainHandler->dds()->ismDtc()->getUtmFootprintById(mseId, zoneOut, isGroundLevel);
|
||||
|
||||
minesToTrigger.clear();
|
||||
minesToTrigger.reserve(m_triggeredMines.size());
|
||||
for (const Database::AesMineAreaTriggeredMines &tm : qAsConst(m_triggeredMines))
|
||||
for (const Database::AesMineAreaTriggeredMines &tm : std::as_const(m_triggeredMines))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utmMinePos = LtsCoordTrans::UtmCoordinate::fromGeographic(tm.position, zoneOut);
|
||||
if (footprint.containsPoint(QPointF(utmMinePos.x, utmMinePos.y), Qt::OddEvenFill))
|
||||
@@ -349,7 +350,7 @@ bool ObjectMineArea::publishTriggeredImpacts()
|
||||
tis.bitfield().resize((m_triggeredMines.size() + 7) / 8);
|
||||
|
||||
int i = 0;
|
||||
for (const auto &mine : qAsConst(m_triggeredMines))
|
||||
for (const auto &mine : std::as_const(m_triggeredMines))
|
||||
{
|
||||
// Triggered Impact == 0, if mine is disarmed/exploded
|
||||
LtsUtils::BitArray::setBit(tis.bitfield(), i++, !mine.isTriggered);
|
||||
@@ -373,7 +374,7 @@ bool ObjectMineArea::publishDusMineStatus()
|
||||
dms.mines().resize(m_triggeredMines.size());
|
||||
int i = 0;
|
||||
|
||||
for (const auto &mine : qAsConst(m_triggeredMines))
|
||||
for (const auto &mine : std::as_const(m_triggeredMines))
|
||||
{
|
||||
const DusMine entry(mine.mineId, mine.isTriggered, mine.chargeTypeId, {mine.position.x(), mine.position.y()});
|
||||
dms.mines()[i++] = entry;
|
||||
@@ -399,7 +400,7 @@ Core::FunctionReplyObject ObjectMineArea::changeSegmentsToLine(bool sortMines)
|
||||
QVector<LtsCoordTrans::UtmCoordinate> polyUtm;
|
||||
polyUtm.reserve(m_mineAreaPolygon.size());
|
||||
|
||||
for (const QPointF &point : qAsConst(m_mineAreaPolygon))
|
||||
for (const QPointF &point : std::as_const(m_mineAreaPolygon))
|
||||
{
|
||||
LtsCoordTrans::UtmCoordinate posUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(point.x(), point.y());
|
||||
DEBUG_LOG(m_logger) << "mineArea Polygon: " << posUtm.mgrs();
|
||||
@@ -408,14 +409,14 @@ Core::FunctionReplyObject ObjectMineArea::changeSegmentsToLine(bool sortMines)
|
||||
|
||||
QVector<LtsCoordTrans::UtmCoordinate> minesUtm;
|
||||
minesUtm.reserve(m_triggeredMines.size());
|
||||
for (const Database::AesMineAreaTriggeredMines &tm : qAsConst(m_triggeredMines))
|
||||
for (const Database::AesMineAreaTriggeredMines &tm : std::as_const(m_triggeredMines))
|
||||
{
|
||||
LtsCoordTrans::UtmCoordinate posUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(tm.position.x(), tm.position.y());
|
||||
DEBUG_LOG(m_logger) << "triggeredMines: " << posUtm.mgrs();
|
||||
minesUtm.append(posUtm);
|
||||
}
|
||||
|
||||
for (const Database::AesMineAreaTriggeredMines &tm : qAsConst(m_triggeredMines))
|
||||
for (const Database::AesMineAreaTriggeredMines &tm : std::as_const(m_triggeredMines))
|
||||
{
|
||||
Core::GeoPosition2D geoPos = Core::GeoPosition2D(tm.position.x(), tm.position.y());
|
||||
vec.append(geoPos);
|
||||
@@ -434,7 +435,7 @@ Core::FunctionReplyObject ObjectMineArea::changeSegmentsToLine(bool sortMines)
|
||||
// In case of MineLayerPoisition (Not Sorting) with DUS Mines and more than 2 Mines (1 Segment) we
|
||||
// ignore the mines and just use the segments positions (Start is the startingPos of the the first segment
|
||||
// then add all end Positions of all segments
|
||||
for (const auto &segment : qAsConst(m_segments))
|
||||
for (const auto &segment : std::as_const(m_segments))
|
||||
{
|
||||
if (vecSorted.empty())
|
||||
vecSorted.push_back(Core::GeoPosition2D(segment.startPosition.x(), segment.startPosition.y()));
|
||||
@@ -472,7 +473,7 @@ Core::FunctionReplyObject ObjectMineArea::changeSegmentsToLine(bool sortMines)
|
||||
DEBUG_LOG(m_logger) << "Distance between startPos and pos: " << length;
|
||||
|
||||
Core::GeoPosition2D newPos = pos;
|
||||
for (const Core::GeoPosition2D &pos2 : qAsConst(vec))
|
||||
for (const Core::GeoPosition2D &pos2 : std::as_const(vec))
|
||||
{
|
||||
if (pos2 == pos || pos2 == startPos)
|
||||
continue;
|
||||
@@ -1034,7 +1035,7 @@ bool ObjectMineArea::containsPointInExpandedMinefield(const QPointF &positionGeo
|
||||
|
||||
const double distance = 0.5;
|
||||
|
||||
for (const QPointF &mineAreaPointUTM : qAsConst(mineAreaPolygonUtm))
|
||||
for (const QPointF &mineAreaPointUTM : std::as_const(mineAreaPolygonUtm))
|
||||
{
|
||||
|
||||
double x = pointUtm.x - mineAreaPointUTM.x();
|
||||
@@ -1138,7 +1139,7 @@ void ObjectMineArea::updateMineByOldMineId(Database::AesMineAreaTriggeredMines &
|
||||
int ObjectMineArea::mineCount()
|
||||
{
|
||||
double totalLength = 0.0;
|
||||
for (const Database::AesMineAreaSegment &segment : qAsConst(m_segments))
|
||||
for (const Database::AesMineAreaSegment &segment : std::as_const(m_segments))
|
||||
{
|
||||
LtsCoordTrans::UtmCoordinate startPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(segment.startPosition);
|
||||
LtsCoordTrans::UtmCoordinate endPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(segment.endPosition, startPositionUtm.zone);
|
||||
@@ -1351,7 +1352,7 @@ void ObjectMineArea::onPublishData()
|
||||
|
||||
std::vector<MineSegment> segVec;
|
||||
segVec.reserve(m_segments.size());
|
||||
for (const auto &segment : qAsConst(m_segments))
|
||||
for (const auto &segment : std::as_const(m_segments))
|
||||
segVec.emplace_back(
|
||||
MineSegment(Core::GeoPosition2D(segment.startPosition.x(), segment.startPosition.y()), Core::GeoPosition2D(segment.endPosition.x(), segment.endPosition.y())));
|
||||
|
||||
@@ -1442,7 +1443,7 @@ void ObjectMineArea::publishAiv()
|
||||
aiv2.effectStart(toMSec(m_data.effectStart));
|
||||
aiv2.form().clear();
|
||||
aiv2.form().reserve(m_triggeredMines.size());
|
||||
for (const auto &tm : qAsConst(m_triggeredMines))
|
||||
for (const auto &tm : std::as_const(m_triggeredMines))
|
||||
aiv2.form().resize(aiv2.form().size() + 1, Core::GeoPosition(tm.position.x(), tm.position.y(), 0.0));
|
||||
aiv2.boundingBoxBottomLeft(aiv.boundingBoxBottomLeft());
|
||||
aiv2.boundingBoxTopRight(aiv.boundingBoxTopRight());
|
||||
@@ -1493,7 +1494,7 @@ Core::FunctionReplyObject ObjectMineArea::createGeoSegmentsFromMineData(double &
|
||||
|
||||
std::vector<Core::GeoPosition2D> tempMinePos;
|
||||
tempMinePos.reserve(m_triggeredMines.size() + mineData.size());
|
||||
for (const auto &t : qAsConst(m_triggeredMines))
|
||||
for (const auto &t : std::as_const(m_triggeredMines))
|
||||
tempMinePos.emplace_back(Core::GeoPosition2D(t.position.x(), t.position.y()));
|
||||
|
||||
for (const auto &md : mineData)
|
||||
|
||||
+6
-5
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "object_mine_area_null.h"
|
||||
#include <utility>
|
||||
#include "special_area_provider.h"
|
||||
|
||||
#include <QPolygonF>
|
||||
@@ -73,7 +74,7 @@ bool ObjectMineAreaNull::isVirtualMine() const
|
||||
int ObjectMineAreaNull::lastConcreteMineNo()
|
||||
{
|
||||
int lastMineNo = 0;
|
||||
for (const Database::AesMineAreaTriggeredMines &mine : qAsConst(m_triggeredMines))
|
||||
for (const Database::AesMineAreaTriggeredMines &mine : std::as_const(m_triggeredMines))
|
||||
{
|
||||
// NOTE: igniterType/IgniterFunciton = 0 as long as AesMineAreaTriggeredMines does not contain values
|
||||
DEBUG_LOG(m_logger) << "mine: chargeTypeId " << mine.chargeTypeId << ", mineId: " << mine.mineId;
|
||||
@@ -245,7 +246,7 @@ void ObjectMineAreaNull::publishAiv()
|
||||
vec.reserve(m_triggeredMines.size());
|
||||
QPolygonF tmp;
|
||||
tmp.reserve(m_triggeredMines.size());
|
||||
for (const auto &mine : qAsConst(m_triggeredMines))
|
||||
for (const auto &mine : std::as_const(m_triggeredMines))
|
||||
{
|
||||
vec.emplace_back(Core::GeoPosition(mine.position.x(), mine.position.y(), 0));
|
||||
tmp.push_back(mine.position);
|
||||
@@ -285,7 +286,7 @@ bool ObjectMineAreaNull::publishTriggeredImpacts()
|
||||
tis.setId(dds::core::optional<rti::core::int64>(m_setId));
|
||||
|
||||
int i = 0;
|
||||
for (const auto &mine : qAsConst(m_triggeredMines))
|
||||
for (const auto &mine : std::as_const(m_triggeredMines))
|
||||
{
|
||||
// Triggered Impact == 0, if mine is disarmed/exploded
|
||||
LtsUtils::BitArray::setBit(tis.bitfield(), i++, !mine.isTriggered);
|
||||
@@ -307,7 +308,7 @@ bool ObjectMineAreaNull::publishDusMineStatus()
|
||||
dms.mines().resize(m_triggeredMines.size());
|
||||
dms.setId(dds::core::optional<rti::core::int64>(m_setId));
|
||||
int i = 0;
|
||||
for (const auto &mine : qAsConst(m_triggeredMines))
|
||||
for (const auto &mine : std::as_const(m_triggeredMines))
|
||||
{
|
||||
const DusMine entry(mine.mineId, mine.isTriggered, mine.chargeTypeId, {mine.position.x(), mine.position.y()});
|
||||
dms.mines()[i++] = entry;
|
||||
@@ -328,7 +329,7 @@ QPolygonF ObjectMineAreaNull::generateForm()
|
||||
vec.reserve(m_triggeredMines.size());
|
||||
QPolygonF tmp;
|
||||
tmp.reserve(m_triggeredMines.size());
|
||||
for (const auto &mine : qAsConst(m_triggeredMines))
|
||||
for (const auto &mine : std::as_const(m_triggeredMines))
|
||||
{
|
||||
vec.emplace_back(Core::GeoPosition(mine.position.x(), mine.position.y(), 0));
|
||||
tmp.push_back(mine.position);
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "object_mine_corridor.h"
|
||||
#include <utility>
|
||||
#include "special_area_provider.h"
|
||||
|
||||
#include "Utils/polygons.h"
|
||||
@@ -140,7 +141,7 @@ Core::FunctionReplyObject ObjectMineCorridor::updateObject(const Database::AesMi
|
||||
for (size_t i = 0; i < segments.size(); ++i)
|
||||
tmpSegments[i].position = QPointF(segments[i].lon(), segments[i].lat());
|
||||
|
||||
for (const Database::AesMineCorridorSegment &segment : qAsConst(tmpSegments))
|
||||
for (const Database::AesMineCorridorSegment &segment : std::as_const(tmpSegments))
|
||||
{
|
||||
if (!m_mainHandler->db()->update(segment))
|
||||
return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating AesMineCorridorSegment-data in database."));
|
||||
|
||||
@@ -42,7 +42,7 @@ NGL_TARGET_LINK_LIBRARIES(svcAsmCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ngldb
|
||||
ddscore
|
||||
NGLLogger
|
||||
@@ -159,7 +159,7 @@ CODEGEN_SQL(SRCS_exe ${xml_FILE})
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(SV AAR svcAssetManagement ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAssetManagement
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
svcAsmCommon
|
||||
svcAsmServer
|
||||
svcCoreClient
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ IF(BUILD_TESTING)
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(asmTests ${SRCS_TEST} ${HDRS_TEST})
|
||||
TARGET_LINK_LIBRARIES(asmTests
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAsmClient
|
||||
LtsCommandLineParser
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_training_area.h"
|
||||
#include <utility>
|
||||
#include "object_training_area.h"
|
||||
#include "main_handler.h"
|
||||
#include "convert_db_to_dds.h"
|
||||
@@ -46,7 +47,7 @@ bool HandlerTrainingArea::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const Database::AsmMapDescription &data : qAsConst(dataVecMD))
|
||||
for (const Database::AsmMapDescription &data : std::as_const(dataVecMD))
|
||||
{
|
||||
ObjectMapDescription *ifs(new ObjectMapDescription(m_mainHandler));
|
||||
Core::FunctionReplyObject ret = ifs->createObject(convert(data), data.objOrder);
|
||||
@@ -94,7 +95,7 @@ bool HandlerTrainingArea::init()
|
||||
}
|
||||
|
||||
// create asm_training_area
|
||||
for (const Database::AsmTrainingArea &data : qAsConst(dataVec))
|
||||
for (const Database::AsmTrainingArea &data : std::as_const(dataVec))
|
||||
{
|
||||
// insert sequences of map descriptions in data
|
||||
ObjectTrainingArea *ifs(new ObjectTrainingArea(m_mainHandler));
|
||||
|
||||
@@ -141,8 +141,8 @@ NGL_TARGET_LINK_LIBRARIES(svcAvmCommon
|
||||
RTI::nddscpp2
|
||||
ngltools
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
NGLLogger
|
||||
LtsUtilsCore
|
||||
svcIsmClient
|
||||
@@ -280,8 +280,8 @@ NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcAudioVideoManagement ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAudioVideoManagement
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
svcAvmCommon
|
||||
svcAvmServer
|
||||
svcCoreClient
|
||||
|
||||
+6
-6
@@ -31,8 +31,8 @@ IF(BUILD_TESTING)
|
||||
|
||||
ADD_EXECUTABLE(avmFtTests ${SRCS_FT_TEST} ${HDRS_FT_TEST})
|
||||
TARGET_LINK_LIBRARIES(avmFtTests
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAvmClient
|
||||
LtsCommandLineParser
|
||||
@@ -42,8 +42,8 @@ IF(BUILD_TESTING)
|
||||
|
||||
ADD_EXECUTABLE(avmVcaTests ${SRCS_VCA_TEST} ${HDRS_VCA_TEST})
|
||||
TARGET_LINK_LIBRARIES(avmVcaTests
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAvmClient
|
||||
svcCoreClient
|
||||
@@ -54,8 +54,8 @@ IF(BUILD_TESTING)
|
||||
|
||||
ADD_EXECUTABLE(mvsTests ${SRCS_MVS_TEST} ${HDRS_MVS_TEST})
|
||||
TARGET_LINK_LIBRARIES(mvsTests
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAvmClient
|
||||
LtsCommandLineParser
|
||||
|
||||
+3
-2
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "avm_vca_tests.h"
|
||||
#include <utility>
|
||||
#include <AudioVideoManagement/avm_dtc.h>
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCommandLineParser/LtsCommandLineParser.h>
|
||||
@@ -193,14 +194,14 @@ void AvmVcaTests::createCnrConfig()
|
||||
|
||||
void AvmVcaTests::removeTvcConfig()
|
||||
{
|
||||
for (auto id: qAsConst(m_tvcConfigIds))
|
||||
for (auto id: std::as_const(m_tvcConfigIds))
|
||||
m_ftc->removeTvcConfigRequest(RemoveTvcConfigRequest{id}, this);
|
||||
QTRY_VERIFY(m_tvcConfigIds.isEmpty());
|
||||
}
|
||||
|
||||
void AvmVcaTests::removeCnrConfig()
|
||||
{
|
||||
for (auto id: qAsConst(m_cnrConfigIds))
|
||||
for (auto id: std::as_const(m_cnrConfigIds))
|
||||
m_ftc->removeCnrConfigRequest(RemoveCnrConfigRequest{id}, this);
|
||||
QTRY_VERIFY(m_cnrConfigIds.isEmpty());
|
||||
}
|
||||
|
||||
+6
-6
@@ -18,8 +18,8 @@ SET(SRCS_static
|
||||
NGL_ADD_LIBRARY(WS AAR SV avaTestServer_static STATIC ${SRCS_static})
|
||||
NGL_TARGET_LINK_LIBRARIES(avaTestServer_static
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
)
|
||||
|
||||
SET(SRCS
|
||||
@@ -29,7 +29,7 @@ SET(SRCS
|
||||
NGL_ADD_EXECUTABLE(WS AAR SV NO_TRANSLATION avaTestServer ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(avaTestServer
|
||||
avaTestServer_static
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
@@ -63,9 +63,9 @@ IF(BUILD_TESTING)
|
||||
IF(TARGET svcAvmCommon)
|
||||
ADD_EXECUTABLE(avmTests ${SRCS})
|
||||
TARGET_LINK_LIBRARIES(avmTests
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::Test
|
||||
svcAvmCommon
|
||||
svcIsmCommon
|
||||
avaTestServer_static
|
||||
|
||||
+2
-1
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <QtNetwork/QHostAddress>
|
||||
#include <utility>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QString>
|
||||
@@ -325,7 +326,7 @@ AvaTestServer::AvaTestServer()
|
||||
|
||||
AvaTestServer::~AvaTestServer()
|
||||
{
|
||||
for (QTcpSocket *conn : qAsConst(m_Conns))
|
||||
for (QTcpSocket *conn : std::as_const(m_Conns))
|
||||
{
|
||||
// disconnect before we delete as otherwise closedConnection() would be called wich would
|
||||
// also delete the socket.
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "ava_state.h"
|
||||
#include <utility>
|
||||
#include "ava_session.h"
|
||||
#include "ava_control.h"
|
||||
#include "av_helper.h"
|
||||
@@ -40,7 +41,7 @@ AvaState::AvaState(AvaSession *session)
|
||||
QStringList AvaState::currentLiveVideoStreams() const
|
||||
{
|
||||
QStringList streams;
|
||||
for (const QMap<QString, AvaStreamState> &map : qAsConst(m_videoState))
|
||||
for (const QMap<QString, AvaStreamState> &map : std::as_const(m_videoState))
|
||||
{
|
||||
const QList<QString> streamNames = map.keys();
|
||||
for (const QString &streamName : streamNames)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "cnr_handler.h"
|
||||
#include <utility>
|
||||
#include "avm_dts.h"
|
||||
#include "dds_handler.h"
|
||||
#include "exercise_context.h"
|
||||
@@ -235,7 +236,7 @@ bool CnrHandler::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const AvmCnrChannel ¤tChannel : qAsConst(m_channels))
|
||||
for (const AvmCnrChannel ¤tChannel : std::as_const(m_channels))
|
||||
m_dts->publish(::AudioVideoManagement::toDds(currentChannel));
|
||||
|
||||
// Don't use select with callback here as addConfig() uses the DB, too.
|
||||
@@ -246,7 +247,7 @@ bool CnrHandler::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const AvmCnrConfig ¤tConfig : qAsConst(cnrConfigs))
|
||||
for (const AvmCnrConfig ¤tConfig : std::as_const(cnrConfigs))
|
||||
{
|
||||
auto reply = createCnrConfig(toRequest(currentConfig, 0), currentConfig.id);
|
||||
if (reply.error())
|
||||
@@ -399,7 +400,7 @@ void CnrHandler::updateDeviceConfig()
|
||||
{
|
||||
DBTransaction trans(m_db->database());
|
||||
|
||||
for (const auto &config : qAsConst(m_cache))
|
||||
for (const auto &config : std::as_const(m_cache))
|
||||
if (config.isActive())
|
||||
m_deviceConfig->update(config);
|
||||
|
||||
@@ -481,7 +482,7 @@ Core::FunctionReplyObject CnrHandler::validateRequest(const ModifyCnrConfigReque
|
||||
*/
|
||||
bool CnrHandler::checkConstraint(const std::function<bool (const CnrConfig &)> &constraint, const boost::optional<int> &exerciseId, const boost::optional<int32_t> &excludeId) const
|
||||
{
|
||||
for (const CnrConfig &config : qAsConst(m_cache))
|
||||
for (const CnrConfig &config : std::as_const(m_cache))
|
||||
{
|
||||
if (excludeId == config.id())
|
||||
continue;
|
||||
@@ -707,7 +708,7 @@ QString CnrHandler::exerciseList(const CnrConfig &config) const
|
||||
|
||||
// Global - all active exercises, no matter if they have active plannings or not
|
||||
QStringList exerciseList;
|
||||
for (const auto &context : qAsConst(m_activeExercises->allContexts()))
|
||||
for (const auto &context : std::as_const(m_activeExercises->allContexts()))
|
||||
exerciseList.append(context.toString());
|
||||
return exerciseList.join(QLatin1Char(','));
|
||||
}
|
||||
@@ -744,7 +745,7 @@ int CnrHandler::normalizedAddacChannel(int addacChannel) const
|
||||
|
||||
Database::AvmCnrChannel CnrHandler::channelById(int32_t id) const
|
||||
{
|
||||
for (const Database::AvmCnrChannel &channel : qAsConst(m_channels))
|
||||
for (const Database::AvmCnrChannel &channel : std::as_const(m_channels))
|
||||
if (channel.id == id)
|
||||
return channel;
|
||||
|
||||
|
||||
+5
-4
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "cnr_tvc_profile_handler.h"
|
||||
#include <utility>
|
||||
#include "cnr_handler.h"
|
||||
#include "tvc_handler.h"
|
||||
#include <AudioVideoManagement/avm_dts.h>
|
||||
@@ -49,7 +50,7 @@ CnrTvcProfile toDds(const Database::AvmCnrTvcProfile &circuitContainerDb, T circ
|
||||
|
||||
CnrTvcProfile circuitContainerDds(circuitContainerDb.id, circuitContainerDb.operatorId, circuitContainerDb.exerciseId, {});
|
||||
circuitContainerDds.data().reserve(circuitsDb.size());
|
||||
for (const auto ¤tCircuitDb : qAsConst(circuitsDb))
|
||||
for (const auto ¤tCircuitDb : std::as_const(circuitsDb))
|
||||
circuitContainerDds.data().push_back(toDds(currentCircuitDb));
|
||||
return circuitContainerDds;
|
||||
}
|
||||
@@ -148,7 +149,7 @@ bool CnrTvcProfileHandler::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const auto ¤tCircuitContainer: qAsConst(circuitContainersDb))
|
||||
for (const auto ¤tCircuitContainer: std::as_const(circuitContainersDb))
|
||||
status &= collectAndPublish(currentCircuitContainer);
|
||||
|
||||
return status;
|
||||
@@ -570,7 +571,7 @@ void CnrTvcProfileHandler::onConfigChanged(int32_t configId, RadioSystem type)
|
||||
|
||||
// Find all CnrTvcProfiles where this config is referenced and reload those.
|
||||
// Hint: reloading might modify m_cache. Thus the reloading is done in a separate loop.
|
||||
for (const auto &profile : qAsConst(m_cache))
|
||||
for (const auto &profile : std::as_const(m_cache))
|
||||
for (const auto &data : profile.data())
|
||||
if (data.radioSystemId() == type && data.radioCircuitId() == configId)
|
||||
{
|
||||
@@ -578,7 +579,7 @@ void CnrTvcProfileHandler::onConfigChanged(int32_t configId, RadioSystem type)
|
||||
break;
|
||||
}
|
||||
|
||||
for (const auto &profile : qAsConst(toBeReloaded))
|
||||
for (const auto &profile : std::as_const(toBeReloaded))
|
||||
{
|
||||
Database::AvmCnrTvcProfile profileDb = toDb(profile);
|
||||
const bool isReload = true;
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "exercises_handler.h"
|
||||
#include <utility>
|
||||
#include "dds_handler.h"
|
||||
#include "dds_handler_exercise.h"
|
||||
#include "main_handler.h"
|
||||
@@ -80,7 +81,7 @@ bool ExercisesHandler::init()
|
||||
return false;
|
||||
|
||||
DBTransaction trans(db()->database());
|
||||
for (const Database::AvmDeviceConfig &dc : qAsConst(avmDeviceConfig))
|
||||
for (const Database::AvmDeviceConfig &dc : std::as_const(avmDeviceConfig))
|
||||
{
|
||||
// nur hinzufuegen, wenn es record/replay session ist
|
||||
// alle anderen -> aus DB loeschen
|
||||
|
||||
+4
-3
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "frequency_planning_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include <Proxies/CombatNetRadio/Helper/cnr_frequency_planning_helper.h>
|
||||
#include "frequency_set_handler.h"
|
||||
@@ -160,7 +161,7 @@ bool FrequencyPlanningHandler::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const Database::AvmFrequencyPlanning &planContainerDb : qAsConst(frequencyPlannings))
|
||||
for (const Database::AvmFrequencyPlanning &planContainerDb : std::as_const(frequencyPlannings))
|
||||
collectAndPublish(planContainerDb);
|
||||
|
||||
auto cbAfp = [this] (const Database::AvmActiveFrequencyPlanning ¤tDbData)
|
||||
@@ -360,7 +361,7 @@ Core::FunctionReplyObject FrequencyPlanningHandler::validateRequest(const Modify
|
||||
for (const FrequencyPlanningData &entry : request.data())
|
||||
{
|
||||
QSet<int> frequencySetEntries = AudioVideoManagement::frequencySetDataIds(entry.properties());
|
||||
for(const int &setEntry : qAsConst(frequencySetEntries))
|
||||
for(const int &setEntry : std::as_const(frequencySetEntries))
|
||||
{
|
||||
if (setEntry != 0 && !m_frequencySetHandler->isValid(request.frequencySetId(), setEntry))
|
||||
return reply.setStr(tr_lts("dds", "FrequencySetData %1 does not belong to FrequencySet %2")).arg(setEntry).arg(request.frequencySetId());
|
||||
@@ -556,7 +557,7 @@ Core::FunctionReplyObject FrequencyPlanningHandler::testActivation(const std::ve
|
||||
for (const FrequencyPlanningData &fpdEntry : entries)
|
||||
{
|
||||
QSet<int> frequencySetEntries = AudioVideoManagement::frequencySetDataIds(fpdEntry.properties());
|
||||
for(const int &setEntry : qAsConst(frequencySetEntries))
|
||||
for(const int &setEntry : std::as_const(frequencySetEntries))
|
||||
{
|
||||
if(takenSetEntries.contains(setEntry))
|
||||
{
|
||||
|
||||
+2
-1
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "frequency_set_handler.h"
|
||||
#include <utility>
|
||||
#include "dds_handler.h"
|
||||
#include "main_handler.h"
|
||||
#include <AudioVideoManagement/avm_dts.h>
|
||||
@@ -37,7 +38,7 @@ bool FrequencySetHandler::init()
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Found " << frequencySets.size() << " Frequency Sets";
|
||||
|
||||
for (const Database::AvmFrequencySet ¤tfrequencySet : qAsConst(frequencySets))
|
||||
for (const Database::AvmFrequencySet ¤tfrequencySet : std::as_const(frequencySets))
|
||||
addFrequencySet(toDdsFrequencySet(currentfrequencySet));
|
||||
|
||||
return true;
|
||||
|
||||
+5
-4
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_frequency_planning_status.h"
|
||||
#include <utility>
|
||||
#include "object_frequency_planning_status.h"
|
||||
|
||||
#include "avm_db.h"
|
||||
@@ -81,7 +82,7 @@ bool HandlerFrequencyPlanningStatus::init()
|
||||
}
|
||||
|
||||
// create objects
|
||||
for (const Database::AvmFrequencyPlanningStatus &data : qAsConst(dataVec))
|
||||
for (const Database::AvmFrequencyPlanningStatus &data : std::as_const(dataVec))
|
||||
{
|
||||
FrequencyPlanningStatus ddsData = ObjectFrequencyPlanningStatus::toDdsData(data);
|
||||
ObjectFrequencyPlanningStatus *ifs(new ObjectFrequencyPlanningStatus(m_dts, m_db));
|
||||
@@ -112,7 +113,7 @@ void HandlerFrequencyPlanningStatus::onClearFrequencyPlanningStatusRequest(const
|
||||
{
|
||||
Q_UNUSED(request);
|
||||
Core::FunctionReplyObject ret;
|
||||
for (ObjectFrequencyPlanningStatus *ifs : qAsConst(m_data))
|
||||
for (ObjectFrequencyPlanningStatus *ifs : std::as_const(m_data))
|
||||
{
|
||||
ret = ifs->clearValues();
|
||||
if (ret.error())
|
||||
@@ -125,7 +126,7 @@ void HandlerFrequencyPlanningStatus::onRemoveFrequencyPlanningStatusByClientRequ
|
||||
{
|
||||
Core::FunctionReplyObject ret;
|
||||
QVector<int> clients;
|
||||
for (ObjectFrequencyPlanningStatus *ifs : qAsConst(m_data))
|
||||
for (ObjectFrequencyPlanningStatus *ifs : std::as_const(m_data))
|
||||
{
|
||||
if (request.client() == 0 || ifs->getData().client() == request.client())
|
||||
{
|
||||
@@ -137,7 +138,7 @@ void HandlerFrequencyPlanningStatus::onRemoveFrequencyPlanningStatusByClientRequ
|
||||
clients << client;
|
||||
}
|
||||
}
|
||||
for (int client : qAsConst(clients))
|
||||
for (int client : std::as_const(clients))
|
||||
{
|
||||
// delete ObjectVideoReceiver
|
||||
delete m_data[client];
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_video_receiver.h"
|
||||
#include <utility>
|
||||
#include "object_video_receiver.h"
|
||||
|
||||
#include <QNetworkReply>
|
||||
@@ -68,7 +69,7 @@ bool HandlerVideoReceiver::init()
|
||||
}
|
||||
|
||||
// create objects
|
||||
for (const Database::AvmVideoReceiver &data : qAsConst(dataVec))
|
||||
for (const Database::AvmVideoReceiver &data : std::as_const(dataVec))
|
||||
{
|
||||
AudioVideoManagement::VideoReceiver ddsData = ObjectVideoReceiver::toDdsData(data);
|
||||
ObjectVideoReceiver *ifs(new ObjectVideoReceiver(m_dts, m_db));
|
||||
|
||||
+5
-4
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_video_team.h"
|
||||
#include <utility>
|
||||
#include "object_video_team.h"
|
||||
#include "default_av_menus.h"
|
||||
|
||||
@@ -143,7 +144,7 @@ bool HandlerVideoTeam::init()
|
||||
}
|
||||
|
||||
// create objects
|
||||
for (const Database::AvmVideoTeam &data : qAsConst(dataVec))
|
||||
for (const Database::AvmVideoTeam &data : std::as_const(dataVec))
|
||||
{
|
||||
VideoTeam ddsData = ObjectVideoTeam::toDdsData(data);
|
||||
ObjectVideoTeam *ifs(new ObjectVideoTeam(m_dts, m_db));
|
||||
@@ -168,7 +169,7 @@ bool HandlerVideoTeam::init()
|
||||
QMap<int, VideoTeam> HandlerVideoTeam::videoTeams() const
|
||||
{
|
||||
QMap<int, VideoTeam> ret;
|
||||
for (const auto &videoTeam : qAsConst(m_videoTeamObjMap))
|
||||
for (const auto &videoTeam : std::as_const(m_videoTeamObjMap))
|
||||
ret.insert(videoTeam->getId(), videoTeam->getData());
|
||||
return ret;
|
||||
}
|
||||
@@ -193,7 +194,7 @@ bool HandlerVideoTeam::needDeviceConfig(const VideoTeam &videoTeam) const
|
||||
|
||||
void HandlerVideoTeam::onContextActivated(const ExerciseContext &context)
|
||||
{
|
||||
for (const auto *ifs : qAsConst(m_videoTeamObjMap))
|
||||
for (const auto *ifs : std::as_const(m_videoTeamObjMap))
|
||||
{
|
||||
VideoTeam ddsData = ifs->getData();
|
||||
if (ddsData.exerciseId() == context.id())
|
||||
@@ -203,7 +204,7 @@ void HandlerVideoTeam::onContextActivated(const ExerciseContext &context)
|
||||
|
||||
void HandlerVideoTeam::onContextDeactivated(const ExerciseContext &context)
|
||||
{
|
||||
for (ObjectVideoTeam *ifs : qAsConst(m_videoTeamObjMap))
|
||||
for (ObjectVideoTeam *ifs : std::as_const(m_videoTeamObjMap))
|
||||
{
|
||||
if (ifs->exerciseId() == context.id())
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "tvc_handler.h"
|
||||
#include <utility>
|
||||
#include "dds_handler.h"
|
||||
#include "exercise_context.h"
|
||||
#include "active_exercises.h"
|
||||
@@ -201,7 +202,7 @@ bool TvcHandler::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const AvmTvcChannel ¤tChannel : qAsConst(m_channels))
|
||||
for (const AvmTvcChannel ¤tChannel : std::as_const(m_channels))
|
||||
m_dts->publish(toDds(currentChannel));
|
||||
|
||||
QVector<AvmTvcConfig> tvcConfigs;
|
||||
@@ -212,7 +213,7 @@ bool TvcHandler::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const AvmTvcConfig ¤tConfig : qAsConst(tvcConfigs))
|
||||
for (const AvmTvcConfig ¤tConfig : std::as_const(tvcConfigs))
|
||||
createTvcConfig(toRequest(currentConfig, 0), currentConfig.id);
|
||||
|
||||
return true;
|
||||
@@ -412,7 +413,7 @@ Database::AvmDeviceConfig TvcHandler::toDeviceConfig(const TvcConfig &tvcConfig)
|
||||
|
||||
Database::AvmTvcChannel TvcHandler::channelById(int32_t id) const
|
||||
{
|
||||
for (const Database::AvmTvcChannel &channel : qAsConst(m_channels))
|
||||
for (const Database::AvmTvcChannel &channel : std::as_const(m_channels))
|
||||
if (channel.id == id)
|
||||
return channel;
|
||||
|
||||
@@ -424,7 +425,7 @@ void TvcHandler::onContextActivated(const ExerciseContext &context)
|
||||
{
|
||||
bool isFirstActiveExercise = m_activeExercises->count() == 1;
|
||||
|
||||
for (const TvcConfig &tvcConfig : qAsConst(m_cache))
|
||||
for (const TvcConfig &tvcConfig : std::as_const(m_cache))
|
||||
{
|
||||
bool isLocal = tvcConfig.exerciseId().is_set();
|
||||
if (isLocal)
|
||||
@@ -446,7 +447,7 @@ void TvcHandler::onContextDeactivated(const ExerciseContext &context)
|
||||
{
|
||||
bool haveActiveExercise = m_activeExercises->count() > 0;
|
||||
|
||||
for (const TvcConfig &tvcConfig : qAsConst(m_cache))
|
||||
for (const TvcConfig &tvcConfig : std::as_const(m_cache))
|
||||
{
|
||||
bool isLocal = tvcConfig.exerciseId().is_set();
|
||||
|
||||
@@ -526,7 +527,7 @@ Core::FunctionReplyObject TvcHandler::validateRequest(const ModifyTvcConfigReque
|
||||
*/
|
||||
bool TvcHandler::checkConstraint(const std::function<bool (const TvcConfig &)> &constraint, const boost::optional<int> &exerciseId, const boost::optional<int32_t> &excludeId) const
|
||||
{
|
||||
for (const TvcConfig &config : qAsConst(m_cache))
|
||||
for (const TvcConfig &config : std::as_const(m_cache))
|
||||
{
|
||||
if (excludeId == config.id())
|
||||
continue;
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
|
||||
ADD_SUBDIRECTORY(AlarmManagement)
|
||||
ADD_SUBDIRECTORY(AreaEffectSimulation)
|
||||
ADD_SUBDIRECTORY(AudioVideoManagement)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(AudioVideoManagement)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(AssetManagement)
|
||||
ADD_SUBDIRECTORY(CentralEffectSimulation)
|
||||
ADD_SUBDIRECTORY(CodificationManagement)
|
||||
@@ -19,20 +21,28 @@ ADD_SUBDIRECTORY(FileManagement)
|
||||
ADD_SUBDIRECTORY(FilterManagement)
|
||||
ADD_SUBDIRECTORY(GuezIedManagement)
|
||||
ADD_SUBDIRECTORY(GuezMinelayerProcessing)
|
||||
ADD_SUBDIRECTORY(InfrastructureManagement)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(InfrastructureManagement)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(MarkerManagement)
|
||||
ADD_SUBDIRECTORY(Messaging)
|
||||
ADD_SUBDIRECTORY(MeteoDataManagement)
|
||||
ADD_SUBDIRECTORY(NotificationManagement)
|
||||
#ADD_SUBDIRECTORY(NmeaManagement)
|
||||
ADD_SUBDIRECTORY(OcBaseDownload)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(OcBaseDownload)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(OcSituationClient)
|
||||
ADD_SUBDIRECTORY(OcSituationServer)
|
||||
ADD_SUBDIRECTORY(OnlineReports)
|
||||
ADD_SUBDIRECTORY(OperatorManagement)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(OperatorManagement)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(ParticipantManagement)
|
||||
ADD_SUBDIRECTORY(PlanEditor)
|
||||
ADD_SUBDIRECTORY(PresentationManagement)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(PresentationManagement)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(ProjectDataManagement)
|
||||
ADD_SUBDIRECTORY(ProjectionWorkstation)
|
||||
ADD_SUBDIRECTORY(RecordingManagement)
|
||||
@@ -42,14 +52,22 @@ ADD_SUBDIRECTORY(ServiceManagement)
|
||||
ADD_SUBDIRECTORY(ScreenRecording)
|
||||
ADD_SUBDIRECTORY(ServiceMonitor)
|
||||
ADD_SUBDIRECTORY(SituationMap)
|
||||
ADD_SUBDIRECTORY(SituationReplayManagement)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(SituationReplayManagement)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(SituationReplay)
|
||||
ADD_SUBDIRECTORY(SoundManagement)
|
||||
ADD_SUBDIRECTORY(TargetManagement)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(SoundManagement)
|
||||
ENDIF()
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(TargetManagement)
|
||||
ENDIF()
|
||||
IF (NOT BUILD_RPM)
|
||||
ADD_SUBDIRECTORY(VideoOverlayManagement)
|
||||
ENDIF()
|
||||
IF(GUEZ_MODE)
|
||||
ADD_SUBDIRECTORY(WarehouseGuez)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(WarehouseGuez)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
NGL_INSTALL(AAR SV FILES "alias" DESTINATION "." RENAME ".alias")
|
||||
@@ -4,8 +4,12 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
FIND_PACKAGE(Schusstafel REQUIRED)
|
||||
FIND_PACKAGE(ArcGIS REQUIRED)
|
||||
FIND_PACKAGE(Schusstafel)
|
||||
FIND_PACKAGE(ArcGIS)
|
||||
IF (NOT Schusstafel_FOUND OR NOT ArcGIS_FOUND)
|
||||
MESSAGE(WARNING "Schusstafel or ArcGIS not found; skipping CentralEffectSimulation")
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(MacroRTIDDSGen)
|
||||
INCLUDE(MacroCodeGenIdl)
|
||||
@@ -47,7 +51,7 @@ NGL_TARGET_LINK_LIBRARIES(svcCesCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddscore
|
||||
NGLLogger
|
||||
ngldb
|
||||
@@ -226,8 +230,8 @@ NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcCentralEffectSimulation ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcCentralEffectSimulation
|
||||
ArcGISQt5Hack # make sure it's loaded *before* libEsriCommonQt.so
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
nglcoreapplication
|
||||
# ProjectConfig
|
||||
LtsCommandLineParser
|
||||
@@ -256,4 +260,4 @@ TARGET_SOURCES(cesPluginInterface INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ces_plugin_interface.h
|
||||
)
|
||||
TARGET_INCLUDE_DIRECTORIES(cesPluginInterface INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/../)
|
||||
TARGET_LINK_LIBRARIES(cesPluginInterface INTERFACE Qt5::Core svcPdmClient)
|
||||
TARGET_LINK_LIBRARIES(cesPluginInterface INTERFACE Qt6::Core svcPdmClient)
|
||||
+20
-20
@@ -25,8 +25,8 @@ IF(BUILD_TESTING AND BUILD_SV)
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(cesTests ${SRCS_TEST_CES})
|
||||
TARGET_LINK_LIBRARIES(cesTests
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
@@ -68,8 +68,8 @@ IF(BUILD_TESTING AND BUILD_SV)
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(cesTestsOwnership ${SRCS_TEST_CES_OWNERSHIP})
|
||||
TARGET_LINK_LIBRARIES(cesTestsOwnership
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
@@ -110,8 +110,8 @@ IF(BUILD_TESTING AND BUILD_SV)
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(cesTestsBlockedAreas ${SRCS_TEST_CES_OWNERSHIP})
|
||||
TARGET_LINK_LIBRARIES(cesTestsBlockedAreas
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
@@ -153,8 +153,8 @@ IF(BUILD_TESTING AND BUILD_SV)
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(cesTestsSmart ${SRCS_TEST_CES_SMART})
|
||||
TARGET_LINK_LIBRARIES(cesTestsSmart
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
@@ -196,8 +196,8 @@ IF(BUILD_TESTING AND BUILD_SV)
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(cesTestsSimulatedMovement ${SRCS_TEST_CES_SIMULATED_MOVEMENT})
|
||||
TARGET_LINK_LIBRARIES(cesTestsSimulatedMovement
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
@@ -239,8 +239,8 @@ IF(BUILD_TESTING AND BUILD_SV)
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(cesTestsGeopairing ${SRCS_TEST_CES_GEO_PAIRING})
|
||||
TARGET_LINK_LIBRARIES(cesTestsGeopairing
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
@@ -279,8 +279,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(cesTestsGeopairingBsp
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(cesTestsGeopairingBsp ${SRCS_TEST_CES_GEO_PAIRING_BSP})
|
||||
TARGET_LINK_LIBRARIES(cesTestsGeopairingBsp
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
@@ -319,8 +319,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(cesTestsGasPipe
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(cesTestsGasPipe ${SRCS_TEST_CES_GAS_PIPE})
|
||||
TARGET_LINK_LIBRARIES(cesTestsGasPipe
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
@@ -359,8 +359,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(cesBoobyTrap
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(cesTestsBoobyTrap ${SRCS_TEST_CES_BOOBY_TRAP})
|
||||
TARGET_LINK_LIBRARIES(cesTestsBoobyTrap
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
@@ -399,8 +399,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(cesMineAreas
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(cesTestsMineAreas ${SRCS_TEST_CES_MINE_AREAS})
|
||||
TARGET_LINK_LIBRARIES(cesTestsMineAreas
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ SET(SRCS
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginArtillerySound MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginArtillerySound
|
||||
Qt5::Network
|
||||
Qt5::Widgets
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngltools
|
||||
ngldb
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ SET(SRCS
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginBasic MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginBasic
|
||||
Qt5::Network
|
||||
Qt5::Widgets
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_participant_borderline.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QLineF>
|
||||
#include <QTimer>
|
||||
@@ -126,7 +127,7 @@ void HandlerParticipantBorderline::onParticipantPositionChanged(const CentralEff
|
||||
<< " participantTypeId=" << partPos.participantTypeId()
|
||||
<< " Anzahl Borderlines=" << m_borderlines.size();
|
||||
|
||||
for (const BorderlineUtm &borderline : qAsConst(m_borderlines))
|
||||
for (const BorderlineUtm &borderline : std::as_const(m_borderlines))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "borderline id = " << borderline.id
|
||||
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(borderline.boundingBox.bottomLeft())
|
||||
|
||||
+6
-5
@@ -6,6 +6,7 @@
|
||||
* Created by gr, SLSE, 2017-02-20
|
||||
*/
|
||||
#include "handler_simulated_movement.h"
|
||||
#include <utility>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
|
||||
#include <QTimer>
|
||||
@@ -65,7 +66,7 @@ bool HandlerSimulatedMovement::loadSimulatedMovementFromDb()
|
||||
DEBUG_LOG(m_logger) << "loadSimulatedMovementSegmentsFromDb size =" << simMoveSegVec.size();
|
||||
|
||||
// add to internal buffer
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovement &data : qAsConst(simMoveVec))
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovement &data : std::as_const(simMoveVec))
|
||||
{
|
||||
CentralEffectSimulation::SimulatedMovement request;
|
||||
request.id(data.id);
|
||||
@@ -77,14 +78,14 @@ bool HandlerSimulatedMovement::loadSimulatedMovementFromDb()
|
||||
DEBUG_LOG(m_logger) << "Loading SimulatedMovement: " << request;
|
||||
|
||||
QMap <int, CentralEffectSimulation::Database::CesSimulatedMovementSegment> segDbMap; // QMap to get it sorted
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segData : qAsConst(simMoveSegVec))
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segData : std::as_const(simMoveSegVec))
|
||||
{
|
||||
if (segData.simulatedMovementId == data.id)
|
||||
segDbMap.insert(segData.positionIndex, segData);
|
||||
}
|
||||
request.segments().reserve(segDbMap.size());
|
||||
CentralEffectSimulation::SimulatedMovementSegment seg;
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segDb : qAsConst(segDbMap))
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segDb : std::as_const(segDbMap))
|
||||
{
|
||||
seg.delay(segDb.delay);
|
||||
seg.name(segDb.name.toStdString());
|
||||
@@ -280,7 +281,7 @@ void HandlerSimulatedMovement::onSimulatedMovementRemoveByParticipantIdRequest(c
|
||||
DEBUG_LOG(m_logger) << "onSimulatedMovementRemoveByParticipantIdRequest: " << request;
|
||||
|
||||
int id = 0;
|
||||
for (const SimulationMovement *simMovement : qAsConst(m_simulationMovements))
|
||||
for (const SimulationMovement *simMovement : std::as_const(m_simulationMovements))
|
||||
{
|
||||
if (simMovement->participantId() == request.participantId())
|
||||
{
|
||||
@@ -299,7 +300,7 @@ SimulationMovement *HandlerSimulatedMovement::findSimulationMovement(int id, int
|
||||
{
|
||||
if (id)
|
||||
return m_simulationMovements.value(id);
|
||||
for (SimulationMovement *s : qAsConst(m_simulationMovements))
|
||||
for (SimulationMovement *s : std::as_const(m_simulationMovements))
|
||||
{
|
||||
if (s->participantId() == participantId)
|
||||
return s;
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@ SET(SRCS
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginCesBuildings MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCesBuildings
|
||||
PUBLIC
|
||||
Qt5::Network
|
||||
Qt5::Widgets
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
LtsCoordinate
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
|
||||
+10
-9
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "ces_building_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <Buildings/BuildingControlUnit/VWM/vwm_xml_reader.h>
|
||||
#include <Buildings/BuildingControlUnit/VWM/vwm_math.h>
|
||||
@@ -103,7 +104,7 @@ bool BuildingModel::init(
|
||||
<< ", m_refPos=" << m_refPos;
|
||||
|
||||
|
||||
for (const InfrastructureManagement::FootprintElement &footprintElement : qAsConst(mfp.elements()))
|
||||
for (const InfrastructureManagement::FootprintElement &footprintElement : std::as_const(mfp.elements()))
|
||||
m_footprint << QPointF(footprintElement.relPosition().offsetX(), footprintElement.relPosition().offsetY());
|
||||
if (m_footprint.isEmpty())
|
||||
{
|
||||
@@ -122,10 +123,10 @@ bool BuildingModel::init(
|
||||
|
||||
m_height = DBL_MIN;
|
||||
const QMap<int, BuildingControlUnit::VWM::Room> &roomMap = rooms();
|
||||
for (const BuildingControlUnit::VWM::Room &room : qAsConst(roomMap))
|
||||
for (const BuildingControlUnit::VWM::OuterWall &outerWall : qAsConst(room.outerWalls()))
|
||||
for (const BuildingControlUnit::VWM::WallElement &wallElement : qAsConst(outerWall.elements()))
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(wallElement))
|
||||
for (const BuildingControlUnit::VWM::Room &room : std::as_const(roomMap))
|
||||
for (const BuildingControlUnit::VWM::OuterWall &outerWall : std::as_const(room.outerWalls()))
|
||||
for (const BuildingControlUnit::VWM::WallElement &wallElement : std::as_const(outerWall.elements()))
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(wallElement))
|
||||
if (point.z() > m_height)
|
||||
m_height = point.z();
|
||||
|
||||
@@ -311,7 +312,7 @@ QVector<LtsUtils::QPoint3D> BuildingModel::fromGeographic(const std::vector<Core
|
||||
{
|
||||
QVector<LtsUtils::QPoint3D> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const Core::GeoPosition &point : qAsConst(points))
|
||||
for (const Core::GeoPosition &point : std::as_const(points))
|
||||
ret.append(fromGeographic(point));
|
||||
return ret;
|
||||
}
|
||||
@@ -326,7 +327,7 @@ std::vector<Core::GeoPosition> BuildingModel::toGeographic(const QVector<LtsUtil
|
||||
{
|
||||
std::vector<Core::GeoPosition> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(points))
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(points))
|
||||
ret.push_back(toGeographic(point));
|
||||
return ret;
|
||||
}
|
||||
@@ -341,7 +342,7 @@ QVector<LtsUtils::QPoint3D> BuildingModel::fromReference(const QVector<LtsUtils:
|
||||
{
|
||||
QVector<LtsUtils::QPoint3D> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(points))
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(points))
|
||||
ret.append(fromReference(point));
|
||||
return ret;
|
||||
}
|
||||
@@ -355,7 +356,7 @@ QVector<LtsUtils::QPoint3D> BuildingModel::toReference(const QVector<LtsUtils::Q
|
||||
{
|
||||
QVector<LtsUtils::QPoint3D> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(points))
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(points))
|
||||
ret.append(toReference(point));
|
||||
return ret;
|
||||
}
|
||||
|
||||
+9
-8
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_aes_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
@@ -234,7 +235,7 @@ void HandlerAesData::calculateBuildingExplosion(const AreaEffectSimulation::Char
|
||||
|
||||
// Bounding-Box-Check
|
||||
// QMap<int, Footprint> m_handlerBuildingData.getFootprints();
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints))
|
||||
{
|
||||
|
||||
const Core::GeoPosition2D impactPosition2D(impactPosition.lon(), impactPosition.lat());
|
||||
@@ -406,7 +407,7 @@ void HandlerAesData::onEffectsChanged(const AreaEffectSimulation::Effects &effec
|
||||
|
||||
// calculate for every building of our exercise:
|
||||
const QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> &footprints = m_handlerBuildingData->getFootprints();
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints))
|
||||
{
|
||||
calculateImpacts(effects, footprint);
|
||||
}
|
||||
@@ -493,7 +494,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
// Vulnerability should be calculated
|
||||
|
||||
const QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> &footprints = m_handlerBuildingData->getFootprints();
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints))
|
||||
{
|
||||
calculateImpacts(data, aesItemView, footprint);
|
||||
} // for
|
||||
@@ -585,7 +586,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
|
||||
CentralEffectSimulation::BitfieldStates &bitfieldStates = m_bitfieldStatesBld[footprint.mseId];
|
||||
QSet<int> &bitfieldState = bitfieldStates[aesItemId];
|
||||
for (int i : qAsConst(bitfieldState))
|
||||
for (int i : std::as_const(bitfieldState))
|
||||
DEBUG_LOG(m_logger) << "bitfieldState for " << aesItemId << ": " << i;
|
||||
|
||||
for (int32_t bitFieldIdx = 0; bitFieldIdx < data.impactCount(); ++bitFieldIdx)
|
||||
@@ -710,7 +711,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
|
||||
|
||||
const std::vector<AreaEffectSimulation::SingleEffect> &singleEffectsRef = effects.singleEffects();
|
||||
int indexBitFieldIdx = -1;
|
||||
for (const AreaEffectSimulation::SingleEffect &singleEffect : qAsConst(singleEffectsRef))
|
||||
for (const AreaEffectSimulation::SingleEffect &singleEffect : std::as_const(singleEffectsRef))
|
||||
{
|
||||
++indexBitFieldIdx;
|
||||
|
||||
@@ -855,7 +856,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary data.form().size()=" << data.form().size();
|
||||
// BoobyTrap
|
||||
polyGeo.reserve(data.form().size());
|
||||
for (const auto &pointGeo : qAsConst(data.form()))
|
||||
for (const auto &pointGeo : std::as_const(data.form()))
|
||||
{
|
||||
QPointF point;
|
||||
point.setX(pointGeo.lon());
|
||||
@@ -872,7 +873,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
<< " exerciseId=" << exerciseId;
|
||||
// only include buildings within the radius
|
||||
|
||||
for (const int buildingId : qAsConst(buildingIdsInside))
|
||||
for (const int buildingId : std::as_const(buildingIdsInside))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " BuildingId=" << buildingId;
|
||||
Buildings::Building tmpBldg;
|
||||
@@ -958,7 +959,7 @@ QVector<int> HandlerAesData::findBuildingsBetween(const LtsCoordTrans::LtsCoordi
|
||||
// check all exercise specific footprints except our:
|
||||
const QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> &allFootprintsOfEx = m_handlerBuildingData->getFootprints();
|
||||
buildingIdsInBetween.reserve(allFootprintsOfEx.size());
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprintToCheck : qAsConst(allFootprintsOfEx))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprintToCheck : std::as_const(allFootprintsOfEx))
|
||||
{
|
||||
// do not check ourself
|
||||
if (footprintToCheck.mseId == targetFootprint.mseId)
|
||||
|
||||
+6
-5
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_building_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
|
||||
@@ -321,7 +322,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
|
||||
QPolygonF polygon2D;
|
||||
polygon2D.reserve(polylineRef.size());
|
||||
for (const Core::GeoPosition &geoPos : qAsConst(polylineRef))
|
||||
for (const Core::GeoPosition &geoPos : std::as_const(polylineRef))
|
||||
polygon2D << QPointF(geoPos.lon(), geoPos.lat());
|
||||
|
||||
// Only the buildings where the line/trajectory flies over the building footprint are taken into account.
|
||||
@@ -332,7 +333,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "relevantBuildings.size=" << relevantBuildings.size();
|
||||
for (const int bldgId : qAsConst(relevantBuildings))
|
||||
for (const int bldgId : std::as_const(relevantBuildings))
|
||||
DEBUG_LOG(m_logger) << "relevantBuilding: bldgId = " << bldgId;
|
||||
}
|
||||
|
||||
@@ -368,8 +369,8 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
<< " , end=" << segEnd;
|
||||
|
||||
int buildingId = -1; // for debugging purposes
|
||||
//for (BuildingModel *buildingModel : qAsConst(m_buildingModels))
|
||||
for (const int bldgId : qAsConst(relevantBuildings))
|
||||
//for (BuildingModel *buildingModel : std::as_const(m_buildingModels))
|
||||
for (const int bldgId : std::as_const(relevantBuildings))
|
||||
{
|
||||
BuildingModel *buildingModel = m_buildingModels.value(bldgId, nullptr);
|
||||
if (!buildingModel)
|
||||
@@ -487,7 +488,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
|
||||
} // if
|
||||
|
||||
} // for (const int bldgId : qAsConst(relevantBuildings))
|
||||
} // for (const int bldgId : std::as_const(relevantBuildings))
|
||||
} // for(lineIt = polylineRef.begin(); lineIt != polylineRef.end()-1; ++lineIt)
|
||||
|
||||
DEBUG_LOG(m_logger) << "END getLineBuildingIntersectionInternal, request '" << request.requestId() << "'"
|
||||
|
||||
+5
-4
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_contamination.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
@@ -156,7 +157,7 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
|
||||
bool isGroundLevel = false;
|
||||
const QVector<int> &buildingIds = dtcIsm.get()->getBuildingByPolygon(exerciseId, polygonGeo, completeEnclosed, isGroundLevel);
|
||||
DEBUG_LOG(m_logger) << "buildingIds.size=" << buildingIds.size();
|
||||
for (int buildingId : qAsConst(buildingIds))
|
||||
for (int buildingId : std::as_const(buildingIds))
|
||||
{
|
||||
calculateBuilding(buildingId, data, chargeHeight, chargeDepression);
|
||||
}
|
||||
@@ -192,7 +193,7 @@ void HandlerContamination::calculateBuilding(int buildingId,
|
||||
DEBUG_LOG(m_logger) << "buildingId=" << buildingId;
|
||||
effectedRooms.clear();
|
||||
effectedFloors = getEffectedFloors(buildingId, chargeHeight, chargeDepression);
|
||||
for (int effectedFloor : qAsConst(effectedFloors))
|
||||
for (int effectedFloor : std::as_const(effectedFloors))
|
||||
effectedRooms += dtcIsm.get()->getRoomIdsFromFloorId(buildingId, effectedFloor);
|
||||
if (!effectedRooms.empty())
|
||||
{
|
||||
@@ -255,7 +256,7 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState
|
||||
// Buildings that have been reset or decontaminated will be recontaminated as long as the nuclear weapon is still present
|
||||
|
||||
const auto aesItemViews = m_ddsHandler->dtcAes()->aesItemViews();
|
||||
for (const auto &aesItemView : qAsConst(aesItemViews))
|
||||
for (const auto &aesItemView : std::as_const(aesItemViews))
|
||||
{
|
||||
if (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
{
|
||||
@@ -370,7 +371,7 @@ QVector<int> HandlerContamination::getEffectedFloors(const int buildingId, const
|
||||
const QVector<int> &floorIds = dtcIsm->getFloorIdsFromBuilding(buildingId);
|
||||
QVector<int> effectedFloorIds;
|
||||
effectedFloorIds.reserve(floorIds.size());
|
||||
for (int floorId : qAsConst(floorIds))
|
||||
for (int floorId : std::as_const(floorIds))
|
||||
{
|
||||
double halfFloorHeight = dtcIsm->getHalfFloorHeight(buildingId, floorId);
|
||||
DEBUG_LOG(m_logger) << " floorId=" << floorId
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ SET(SRCS
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginCes2D MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCes2D
|
||||
PUBLIC
|
||||
Qt5::Network
|
||||
Qt5::Widgets
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
|
||||
+5
-4
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_aes_data.h"
|
||||
#include <utility>
|
||||
#include "settings.h"
|
||||
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
@@ -181,7 +182,7 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
|
||||
// Bounding-Box-Check
|
||||
// QMap<int, Footprint> m_footprints;
|
||||
for (const Footprint &footprint : qAsConst(m_footprints))
|
||||
for (const Footprint &footprint : std::as_const(m_footprints))
|
||||
{
|
||||
const QPointF impactPos(CentralEffectSimulation::geographic2Utm(data.impactPosition(), footprint.zone));
|
||||
const QPolygonF polyBldgRadius({QPointF(footprint.boundingBoxPolyUtm.bottomLeft().rx() - impactRadius,
|
||||
@@ -304,7 +305,7 @@ void HandlerAesData::calculateFootprint(const InfrastructureManagement::MainFoot
|
||||
footprint.geoPosition = mse.geoPosition();
|
||||
const QPointF utmFpPosition = CentralEffectSimulation::geographic2Utm(footprint.geoPosition, &footprint.zone);
|
||||
footprint.polyUtm.reserve(poly.size());
|
||||
for (const QPointF &point : qAsConst(poly))
|
||||
for (const QPointF &point : std::as_const(poly))
|
||||
footprint.polyUtm.push_back(utmFpPosition + point);
|
||||
footprint.boundingBoxPolyUtm = footprint.polyUtm.boundingRect();
|
||||
|
||||
@@ -351,7 +352,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
}
|
||||
// Bounding-Box-Check
|
||||
// QMap<int, Footprint> m_footprints;
|
||||
for (const Footprint &footprint : qAsConst(m_footprints))
|
||||
for (const Footprint &footprint : std::as_const(m_footprints))
|
||||
{
|
||||
//if (boundingBoxImpact.contains(footprint.boundingBoxPolyUtm))
|
||||
calculateImpacts(data, footprint);
|
||||
@@ -407,7 +408,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
|
||||
BitfieldStates &bitfieldStates = m_bitfieldStatesBld[footprint.mseId];
|
||||
QSet<int> &bitfieldState = bitfieldStates[data.aesItemId()];
|
||||
for (int i : qAsConst(bitfieldState))
|
||||
for (int i : std::as_const(bitfieldState))
|
||||
DEBUG_LOG(m_logger) << "bitfieldState for " << data.aesItemId() << ": " << i;
|
||||
|
||||
const AreaEffectSimulation::AesItemView &aesItemView = *it;
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_participant_area.h"
|
||||
#include <utility>
|
||||
#include "settings.h"
|
||||
#include "CentralEffectSimulation/handler_participant.h"
|
||||
|
||||
@@ -498,7 +499,7 @@ void HandlerParticipantArea::calculateAesParticipant(const CentralEffectSimulati
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantPos.participantId();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
@@ -837,7 +838,7 @@ void HandlerParticipantArea::onExplosionSingleCentralChanged(const AreaEffectSim
|
||||
const int effectType = static_cast<int>(EffectType::ExplosionSingle) & 0xffff;
|
||||
const QMap<int, BuildingModel *> buildingModels = m_handlerBuildingModel->buildingModels();
|
||||
const QList<CentralEffectSimulation::HandlerParticipant::CesParticipantData> participantPositions = m_handlerParticipant->positions().values();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : qAsConst(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : std::as_const(participantPositions))
|
||||
{
|
||||
if (participantPosition.insideBuilding())
|
||||
continue;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ SET(SRCS
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginEcho MODULE ${SRCS})
|
||||
NGL_INSTALL_TARGET(cesPluginEcho)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginEcho
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
NGLLogger
|
||||
cesPluginInterface
|
||||
)
|
||||
|
||||
+3
-3
@@ -30,10 +30,10 @@ SET(SRCS
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginExplosions MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginExplosions
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ArcGIS::ArcGIS
|
||||
Qt5::Network
|
||||
Qt5::Widgets
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
NGLLogger
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "expand_polygon.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
|
||||
@@ -28,7 +29,7 @@ QPolygonF bufferUtmPolygon(const QPolygonF &polygonUtmIn, const int zone, const
|
||||
Esri::ArcGISRuntime::PolygonBuilder polygonBuilder(Esri::ArcGISRuntime::SpatialReference(32600 + zone));
|
||||
DEBUG_LOG(logger) << "ExpandPolygon::bufferUtmPolygon";
|
||||
|
||||
for (const QPointF &pointUtm : qAsConst(polygonUtmIn))
|
||||
for (const QPointF &pointUtm : std::as_const(polygonUtmIn))
|
||||
polygonBuilder.addPoint(Esri::ArcGISRuntime::Point(pointUtm.x(), pointUtm.y(), 0));
|
||||
const Esri::ArcGISRuntime::Geometry &esriGeometry = polygonBuilder.toGeometry();
|
||||
|
||||
|
||||
+12
-11
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_explosions.h"
|
||||
#include <utility>
|
||||
#include "expand_polygon.h"
|
||||
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
@@ -223,7 +224,7 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem
|
||||
|
||||
const int remaining = 1; // ICD GUEZSB60_ICD-0052_Zentrale_Tne.doc Wirkfeldtyp Gefahrenbereich Steilfeuer
|
||||
const auto &participantPositions = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions))
|
||||
{
|
||||
if (!allParticipantIdsInArea.contains(pPos.participantId()))
|
||||
continue;
|
||||
@@ -352,7 +353,7 @@ void HandlerExplosions::calculateImpact(const AreaEffectSimulation::ChargeEffect
|
||||
AreaEffectSimulation::ChargeStruct chargeStruct(data.chargeTypeId(),data.igniterTypeId(), data.igniterFunctionId());
|
||||
const double impactRadius = m_ddsHandler->chargeTypeRadius(chargeStruct);
|
||||
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions))
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
@@ -542,7 +543,7 @@ void HandlerExplosions::onExplosionSingleChanged(const AreaEffectSimulation::Exp
|
||||
return;
|
||||
}
|
||||
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions))
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
@@ -633,7 +634,7 @@ void HandlerExplosions::onEffectsChanged(const AreaEffectSimulation::Effects &ef
|
||||
triggeredEffectsLtsCoord.reserve(singleEffectsRef.size());
|
||||
|
||||
int curSeIndex = -1;
|
||||
for (const AreaEffectSimulation::SingleEffect &se : qAsConst(singleEffectsRef))
|
||||
for (const AreaEffectSimulation::SingleEffect &se : std::as_const(singleEffectsRef))
|
||||
{
|
||||
++curSeIndex;
|
||||
if (se.singleEffectState() != AreaEffectSimulation::AesSingleEffectState_def::SesTriggered)
|
||||
@@ -657,7 +658,7 @@ void HandlerExplosions::onEffectsChanged(const AreaEffectSimulation::Effects &ef
|
||||
|
||||
// Now call calculateImpacts() (createEvent if in circle...)
|
||||
const auto &participantPositions = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions))
|
||||
{
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
continue;
|
||||
@@ -893,7 +894,7 @@ void HandlerExplosions::calculateSmartEffect(const AreaEffectSimulation::Effects
|
||||
bool itemAvailable = m_ddsHandler->dtcAes()->aesItemFromId(effects.aesItemId(), aesItem);
|
||||
if ( itemAvailable)
|
||||
{
|
||||
for (const AreaEffectSimulation::SingleEffect &se : qAsConst(effects.singleEffects()))
|
||||
for (const AreaEffectSimulation::SingleEffect &se : std::as_const(effects.singleEffects()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " ---> singleEffect=" << se
|
||||
<< ", aesItem= " << aesItem;
|
||||
@@ -934,7 +935,7 @@ void HandlerExplosions::calculateSmartExplosion(const int32_t aesItemId,
|
||||
bool bHumanFound = false;
|
||||
|
||||
const auto &participantPositions = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : qAsConst(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : std::as_const(participantPositions))
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(participantPosition)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
@@ -1077,7 +1078,7 @@ void HandlerExplosions::calculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
return;
|
||||
|
||||
const auto &participantPositions = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions))
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
@@ -1107,7 +1108,7 @@ void HandlerExplosions::calculateImpacts(const CentralEffectSimulation::AesItemV
|
||||
|
||||
DEBUG_LOG(m_logger) << "XXXXXXXXXXXX calculateImpacts2a impactsToCheck.size " << impactsToCheck.size();
|
||||
|
||||
for (int bitFieldIdx : qAsConst(impactsToCheck))
|
||||
for (int bitFieldIdx : std::as_const(impactsToCheck))
|
||||
{
|
||||
if (itemView.form.size() <= bitFieldIdx)
|
||||
continue;
|
||||
@@ -1165,7 +1166,7 @@ void HandlerExplosions::calculateImpactsEffect(const CentralEffectSimulation::Ae
|
||||
|
||||
DEBUG_LOG(m_logger) << "shiftedParticipantLtsCoord = " << shiftedParticipantLtsCoord.toString(true);
|
||||
|
||||
for (const LtsCoordinate &newTriggeredImpactLtsCoord : qAsConst(triggeredEffectsLtsCoord))
|
||||
for (const LtsCoordinate &newTriggeredImpactLtsCoord : std::as_const(triggeredEffectsLtsCoord))
|
||||
{
|
||||
// const int zoneToUse = itemView.zone;
|
||||
// 2D or 3D??
|
||||
@@ -1330,7 +1331,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul
|
||||
DEBUG_LOG(m_logger) << "calculateImpactsEffect 1 triggeredEffectsUtmPos.size " << triggeredEffectsUtmPos.size();
|
||||
|
||||
int idx = -1;
|
||||
for (const QPointF &newTriggeredImpactUtm : qAsConst(triggeredEffectsUtmPos))
|
||||
for (const QPointF &newTriggeredImpactUtm : std::as_const(triggeredEffectsUtmPos))
|
||||
{
|
||||
++idx;
|
||||
|
||||
|
||||
+4
-3
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_vulcano.h"
|
||||
#include <utility>
|
||||
#include "expand_polygon.h"
|
||||
#include "isInCone.h"
|
||||
#include "settings.h"
|
||||
@@ -244,7 +245,7 @@ void HandlerVulcano::onTrajectoryTimeAwareTimeout()
|
||||
const auto &designationsVec = dpd.designations();
|
||||
DEBUG_LOG(m_logger) << "onTimerTimeout participantId=" << participantId;
|
||||
|
||||
for (const auto &designation : qAsConst(designationsVec))
|
||||
for (const auto &designation : std::as_const(designationsVec))
|
||||
{
|
||||
if (designation.code() == prf && designation.outputPower() > 0)
|
||||
{
|
||||
@@ -368,7 +369,7 @@ Core::GeoPosition HandlerVulcano::getTrajectoryPosFromTime(int aesId, long long
|
||||
|
||||
Core::GeoPosition result;
|
||||
int i = 0;
|
||||
for (const auto &point : qAsConst(trajectoryTimeAwareValue.geometry()))
|
||||
for (const auto &point : std::as_const(trajectoryTimeAwareValue.geometry()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "time=" << point.relativeTime();
|
||||
if ( (point.relativeTime() > relTime) && (i > 0))
|
||||
@@ -404,7 +405,7 @@ void HandlerVulcano::onDynamicParticipantChanged(const ParticipantManagement::Dy
|
||||
<< data.designations().size();
|
||||
if (data.designations().size() > 0)
|
||||
{
|
||||
for (const ParticipantManagement::LaserDesignation &designation : qAsConst(data.designations()))
|
||||
for (const ParticipantManagement::LaserDesignation &designation : std::as_const(data.designations()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "gearId=" << designation.gearId()
|
||||
<< " code=" << designation.code()
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@ SET(SRCS
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginCES_FunctionalAreas MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCES_FunctionalAreas
|
||||
PUBLIC
|
||||
Qt5::Network
|
||||
Qt5::Widgets
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_functional_area.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
@@ -302,7 +303,7 @@ void HandlerFunctionalAreas::onNewParticipantPosition(const CentralEffectSimulat
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
@@ -345,7 +346,7 @@ void HandlerFunctionalAreas::onNewIndoorParticipantPosition(const CentralEffectS
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
|
||||
Loaded 100 of 2395 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user