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 "handler_participant_borderline.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QLineF>
|
||||
#include <QtCore/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 <QtCore/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;
|
||||
|
||||
+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() << "'"
|
||||
|
||||
+11
-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
|
||||
@@ -451,6 +452,8 @@ bool HandlerContamination::isInsideInnerCircle(int buildingId, int aesId)
|
||||
DEBUG_LOG(m_logger) << "isInsideInnerCircle return false";
|
||||
return false;
|
||||
}
|
||||
// unreachable fallback (silences -Wreturn-type; macro uses a for-loop that confuses GCC control flow)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns true if the building is in the inner circle at the time of impact and should fail as a result.
|
||||
@@ -482,6 +485,8 @@ bool HandlerContamination::isInsideBCContamination(int buildingId, int aesId)
|
||||
DEBUG_LOG(m_logger) << "isInsideInnerCircle return false";
|
||||
return false;
|
||||
}
|
||||
// unreachable fallback (silences -Wreturn-type; macro uses a for-loop that confuses GCC control flow)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns true if the building is located in range 1 at the time of impact and is to be contaminated as a result.
|
||||
@@ -514,6 +519,8 @@ bool HandlerContamination::isInsideRange1(int buildingId, int aesId)
|
||||
DEBUG_LOG(m_logger) << "isInsideRange1 return false";
|
||||
return false;
|
||||
}
|
||||
// unreachable fallback (silences -Wreturn-type; macro uses a for-loop that confuses GCC control flow)
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace CesBuildings
|
||||
+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;
|
||||
|
||||
+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()
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_functional_area.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/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())
|
||||
|
||||
+5
-4
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_aes_data.h"
|
||||
#include <utility>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
//#include "main_handler.h"
|
||||
#include "settings.h"
|
||||
@@ -135,7 +136,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,
|
||||
@@ -258,7 +259,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();
|
||||
|
||||
@@ -305,7 +306,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);
|
||||
@@ -361,7 +362,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_gas_pipe.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QLineF>
|
||||
#include <QtCore/QTimer>
|
||||
@@ -202,7 +203,7 @@ void HandlerParticipantGasPipe::onParticipantPositionChanged(const CentralEffect
|
||||
<< " Anzahl GasPipes=" << m_gasPipes.size();
|
||||
|
||||
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &gasPipe : qAsConst(m_gasPipes))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &gasPipe : std::as_const(m_gasPipes))
|
||||
{
|
||||
calculateGasPipeParticipant(gasPipe, partPos);
|
||||
|
||||
@@ -317,7 +318,7 @@ void HandlerParticipantGasPipe::onSendCesHitReply(const Core::FunctionReplyObjec
|
||||
void HandlerParticipantGasPipe::sendFtcCesHitRequestTimeout()
|
||||
{
|
||||
auto ftcTab = m_ddsHandler->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap))
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequestTimeout: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
|
||||
+3
-2
@@ -79,6 +79,7 @@ bool BallisticService::createInterfaceOf(IUnknown **app_interface, E_TypeOfInter
|
||||
}
|
||||
|
||||
Ammunition *configuredAmmunition;
|
||||
Ammunition foundAmmunition; // function-scope copy: loop-local would dangle (use-after-free)
|
||||
E_TypeOfImpl e_impl = e_ImplBase;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Target Interface Pointer : " << app_interface ;
|
||||
@@ -91,9 +92,9 @@ bool BallisticService::createInterfaceOf(IUnknown **app_interface, E_TypeOfInter
|
||||
QVector<N_Ballistic::Ammunition>* ammunitions = m_ammuConfig->GetAmmunitions();
|
||||
for ( int i = 0; i < ammunitions->size(); i++)
|
||||
{
|
||||
N_Ballistic::Ammunition ammunition = m_ammuConfig->GetAmmunitions()->at(i);
|
||||
foundAmmunition = m_ammuConfig->GetAmmunitions()->at(i);
|
||||
//find ammunition
|
||||
configuredAmmunition = &ammunition;
|
||||
configuredAmmunition = &foundAmmunition;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Ammunition found: " << configuredAmmunition->m_AmmunInfo.m_Name ;
|
||||
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_geopairing.h"
|
||||
#include <utility>
|
||||
#include "settings.h"
|
||||
#include "GBL_ConfigSystem/geoconfig.h"
|
||||
#include "GeoPairingImpl/GeoPairingImpl.hpp"
|
||||
@@ -539,7 +540,7 @@ void HandlerGeoPairing::onSendGeopairingDataReply(const Core::FunctionReplyObjec
|
||||
void HandlerGeoPairing::sendFtcCesHitRequestTimeout()
|
||||
{
|
||||
auto ftcTab = m_ddsHandlerAes->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap))
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequest: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_mine_areas.h"
|
||||
#include <utility>
|
||||
#include "CentralEffectSimulation/handler_participant.h"
|
||||
#include "settings.h"
|
||||
|
||||
@@ -373,7 +374,7 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
|
||||
// const QVector<QPointF> utmStepPoly = m_handlerParticipant->getParticipantStep(participantPos.participantId(), m_zone);
|
||||
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
{
|
||||
int remaining = m_ddsHandler->remainingTasCode(itemView.chargeStruct);
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_nbc.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
@@ -497,7 +498,7 @@ void HandlerNBC::onNewOutdoorParticipantPosition(const CentralEffectSimulation::
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId()
|
||||
<< " m_aesItemViews.size()=" << m_aesItemViews.size();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_participant_building.h"
|
||||
#include <utility>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
|
||||
@@ -302,7 +303,7 @@ void HandlerParticipantBuilding::sendCesHitToParticipant(const Buildings::Buildi
|
||||
void HandlerParticipantBuilding::sendFtcCesHitRequestTimeout()
|
||||
{
|
||||
auto ftcTab = m_ddsHandler->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap))
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequest: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_participant_booby_trap.h"
|
||||
#include <utility>
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
@@ -502,7 +503,7 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe
|
||||
return;
|
||||
}
|
||||
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &boobyTrap : qAsConst(m_boobyTrapItems))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &boobyTrap : std::as_const(m_boobyTrapItems))
|
||||
{
|
||||
if (!calculateBoobyTrapParticipant(boobyTrap, partPos))
|
||||
continue;
|
||||
@@ -675,7 +676,7 @@ void HandlerParticipantBoobyTrap::sendFtcBoobyTrapTrigger(int aesItemId)
|
||||
void HandlerParticipantBoobyTrap::sendFtcCesHitRequestTimeout()
|
||||
{
|
||||
auto ftcTab = m_ddsHandler->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap))
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequestTimeout: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_participant_off_route_mine.h"
|
||||
#include <utility>
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
@@ -346,7 +347,7 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
|
||||
return;
|
||||
}
|
||||
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &offRouteMine : qAsConst(m_offRouteMineItems))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &offRouteMine : std::as_const(m_offRouteMineItems))
|
||||
{
|
||||
calculateOffRouteMineParticipant(offRouteMine, partPos);
|
||||
|
||||
@@ -518,7 +519,7 @@ void HandlerParticipantOffRouteMine::sendFtcOffRouteMineTrigger(int aesItemId)
|
||||
void HandlerParticipantOffRouteMine::sendFtcCesHitRequestTimeout()
|
||||
{
|
||||
auto ftcTab = m_ddsHandler->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap))
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequestTimeout: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
|
||||
Reference in new issue
Block a user