fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
+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>
|
||||
@@ -229,7 +230,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;
|
||||
@@ -358,7 +359,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;
|
||||
@@ -555,7 +556,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;
|
||||
@@ -646,7 +647,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::SesTriggered)
|
||||
@@ -670,7 +671,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::CatastrophicKill)
|
||||
continue;
|
||||
@@ -906,7 +907,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;
|
||||
@@ -947,7 +948,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;
|
||||
@@ -1090,7 +1091,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;
|
||||
@@ -1120,7 +1121,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;
|
||||
@@ -1178,7 +1179,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??
|
||||
@@ -1343,7 +1344,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()
|
||||
|
||||
Reference in new issue
Block a user