Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
+2
-2
@@ -42,8 +42,8 @@ NGL_TARGET_LINK_LIBRARIES(BuildingControlBsm
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
BuildingControlCommon
|
||||
)
|
||||
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "bsm_socket_handler.h"
|
||||
#include <utility>
|
||||
#include "bsm_telegrams_base.h"
|
||||
#include "bsm_telegrams_bit_timeout_request.h"
|
||||
#include "bsm_telegrams_chopped_signal_flash.h"
|
||||
@@ -109,7 +110,7 @@ bool SocketHandler::triggerFlashlights(int numberOfFlashes,
|
||||
flash.m_choppedFlashConfig = qBound(2, choppedConfiguration, 10);
|
||||
flash.m_flashDuration = flashDuration;
|
||||
const QByteArray data = flash.toBytestream();
|
||||
for (Socket *s : qAsConst(m_sockets))
|
||||
for (Socket *s : std::as_const(m_sockets))
|
||||
{
|
||||
if (s->isConnected())
|
||||
{
|
||||
@@ -201,7 +202,7 @@ void SocketHandler::onCleanupQueue()
|
||||
return;
|
||||
QVector<OpticalShot> activeShots;
|
||||
qint64 tNow = QDateTime::currentMSecsSinceEpoch();
|
||||
for (const OpticalShot &os : qAsConst(m_lastShots))
|
||||
for (const OpticalShot &os : std::as_const(m_lastShots))
|
||||
{
|
||||
if (os.timeStampMSec < tNow - s_opticalTimeSlot)
|
||||
continue;
|
||||
@@ -237,7 +238,7 @@ Socket *SocketHandler::getSocketForBsm(const QString &hostname)
|
||||
{
|
||||
if (ha.isLoopback())
|
||||
continue;
|
||||
for (Socket *s : qAsConst(m_sockets))
|
||||
for (Socket *s : std::as_const(m_sockets))
|
||||
{
|
||||
if (s->peerAddress() == ha)
|
||||
return s;
|
||||
@@ -356,7 +357,7 @@ void SocketHandler::handleDirectFireSummray()
|
||||
return;
|
||||
int distance = 3000;
|
||||
DEBUG_LOG(m_logger) << "distance=" << distance;
|
||||
for (const OpticalShot &os : qAsConst(m_lastShots))
|
||||
for (const OpticalShot &os : std::as_const(m_lastShots))
|
||||
{
|
||||
int act_distance = os.deposition1 * os.deposition1 + os.deposition2 * os.deposition2;
|
||||
DEBUG_LOG(m_logger) << "act_distance=" << act_distance << " BSM-ID=" << os.id
|
||||
|
||||
+8
-8
@@ -32,12 +32,12 @@ SET(bc_SRCS
|
||||
NGL_ADD_LIBRARY2(AAR SV BuildingControlCommon SHARED ${bcc_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlCommon
|
||||
PRIVATE
|
||||
Qt5::Xml
|
||||
Qt6::Xml
|
||||
nglsettings
|
||||
ngltools
|
||||
PUBLIC
|
||||
NGLLogger
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
LtsUtilsCoreHeaderOnly
|
||||
)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(BuildingControlCommon
|
||||
@@ -47,12 +47,12 @@ NGL_TARGET_INCLUDE_DIRECTORIES(BuildingControlCommon
|
||||
|
||||
NGL_ADD_EXECUTABLE(AAR SV BuildingControlUnit ${bc_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlUnit
|
||||
Qt5::Core
|
||||
Qt5::WebSockets
|
||||
# Qt5::Test
|
||||
Qt5::Xml
|
||||
Qt5::Network
|
||||
Qt5::Concurrent
|
||||
Qt6::Core
|
||||
Qt6::WebSockets
|
||||
# Qt6::Test
|
||||
Qt6::Xml
|
||||
Qt6::Network
|
||||
Qt6::Concurrent
|
||||
BuildingControlBsm
|
||||
BuildingControlCommon
|
||||
BuildingControlJson
|
||||
|
||||
+10
-10
@@ -22,11 +22,11 @@ SET(cot_SRCS
|
||||
NGL_ADD_LIBRARY2(AAR SV ControlEffects SHARED ${co_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(ControlEffects
|
||||
NGLLogger
|
||||
Qt5::Concurrent
|
||||
Qt5::Core
|
||||
# Qt5::Test
|
||||
Qt5::Xml
|
||||
Qt5::Network
|
||||
Qt6::Concurrent
|
||||
Qt6::Core
|
||||
# Qt6::Test
|
||||
Qt6::Xml
|
||||
Qt6::Network
|
||||
BuildingControlCommon
|
||||
BuildingControlVwm
|
||||
BuildingControlBsm
|
||||
@@ -36,11 +36,11 @@ NGL_TARGET_LINK_LIBRARIES(ControlEffects
|
||||
NGL_ADD_EXECUTABLE(AAR SV ControlEffectsTest ${cot_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(ControlEffectsTest
|
||||
NGLLogger
|
||||
Qt5::Concurrent
|
||||
Qt5::Core
|
||||
# Qt5::Test
|
||||
Qt5::Xml
|
||||
Qt5::Network
|
||||
Qt6::Concurrent
|
||||
Qt6::Core
|
||||
# Qt6::Test
|
||||
Qt6::Xml
|
||||
Qt6::Network
|
||||
BuildingControlCommon
|
||||
BuildingControlVwm
|
||||
nglcoreapplication
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "handeleffects.h"
|
||||
#include <utility>
|
||||
#include "handeleffect.h"
|
||||
#include "handle_http_request.h"
|
||||
#include <QTimer>
|
||||
@@ -162,7 +163,7 @@ void HandelEffects::setOverrides(const QVector<BcuEffectState> &effectStates)
|
||||
{
|
||||
m_effectStates = effectStates;
|
||||
DEBUG_LOG(m_logger) << "In set overrides for " << m_hostname << ", effectStates.size: " << effectStates.size();
|
||||
for(const auto &es : qAsConst(m_effectStates))
|
||||
for(const auto &es : std::as_const(m_effectStates))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_effectStates: es.id=" << es.id
|
||||
<< ", es.type=" << es.type
|
||||
@@ -170,7 +171,7 @@ void HandelEffects::setOverrides(const QVector<BcuEffectState> &effectStates)
|
||||
}
|
||||
m_sounds = EffectOverride::EO_Auto;
|
||||
DEBUG_LOG(m_logger) << "Nun die Schleife:";
|
||||
for(const auto &es : qAsConst(effectStates))
|
||||
for(const auto &es : std::as_const(effectStates))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "es.id=" << es.id
|
||||
<< ", es.type=" << es.type
|
||||
|
||||
+3
-3
@@ -14,10 +14,10 @@ SET(json_SRCS
|
||||
NGL_ADD_LIBRARY2(AAR SV BuildingControlJson SHARED ${json_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlJson
|
||||
PRIVATE
|
||||
Qt5::WebSockets
|
||||
Qt6::WebSockets
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
BuildingControlCommon
|
||||
BuildingControlBsm
|
||||
BuildingControlVwm
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "json_api.h"
|
||||
#include <utility>
|
||||
#include "web_socket_handler.h"
|
||||
#include "web_socket_telegrams.h"
|
||||
#include <QWebSocket>
|
||||
@@ -168,7 +169,7 @@ void Api::onTelegramReceived(const std::shared_ptr<Telegrams::BaseTelegram> &tel
|
||||
Telegrams::SetEffectStates *sff = static_cast<Telegrams::SetEffectStates *>(tele.get());
|
||||
QVector<BcuEffectState> val;
|
||||
val.reserve(sff->effectStates.size());
|
||||
for(const auto &fi : qAsConst(sff->effectStates))
|
||||
for(const auto &fi : std::as_const(sff->effectStates))
|
||||
{
|
||||
BcuEffectState ff;
|
||||
ff.id = fi.id;
|
||||
@@ -192,7 +193,7 @@ void Api::onTelegramReceived(const std::shared_ptr<Telegrams::BaseTelegram> &tel
|
||||
Telegrams::SetFortifyFactor *sff = static_cast<Telegrams::SetFortifyFactor *>(tele.get());
|
||||
QVector<FortifyInfo> val;
|
||||
val.reserve(sff->fortifyFactors.size());
|
||||
for(const auto &fi : qAsConst(sff->fortifyFactors))
|
||||
for(const auto &fi : std::as_const(sff->fortifyFactors))
|
||||
{
|
||||
FortifyInfo ff;
|
||||
ff.roomId = fi.roomId;
|
||||
@@ -207,7 +208,7 @@ void Api::onTelegramReceived(const std::shared_ptr<Telegrams::BaseTelegram> &tel
|
||||
Telegrams::RelayState *sff = static_cast<Telegrams::RelayState *>(tele.get());
|
||||
QVector<RelayStateInfo> val;
|
||||
val.reserve(sff->relayStates.size());
|
||||
for(const auto &fi : qAsConst(sff->relayStates))
|
||||
for(const auto &fi : std::as_const(sff->relayStates))
|
||||
{
|
||||
RelayStateInfo ff;
|
||||
ff.id = fi.id;
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "web_socket_handler.h"
|
||||
#include <utility>
|
||||
#include "web_socket_telegrams.h"
|
||||
#include <QWebSocket>
|
||||
#include <iostream>
|
||||
@@ -18,7 +19,7 @@ WebSocketHandler::WebSocketHandler(QObject *parent)
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{
|
||||
for (QWebSocket *s : qAsConst(m_webSockets))
|
||||
for (QWebSocket *s : std::as_const(m_webSockets))
|
||||
{
|
||||
s->disconnect(this);
|
||||
s->close();
|
||||
@@ -51,7 +52,7 @@ bool WebSocketHandler::sendTelegram(const Telegrams::BaseTelegram *tele, QWebSoc
|
||||
DEBUG_LOG(m_logger) << "jsonStr" << jsonStr;
|
||||
|
||||
bool bOk = false;
|
||||
for (QWebSocket *ws : qAsConst(m_webSockets))
|
||||
for (QWebSocket *ws : std::as_const(m_webSockets))
|
||||
{
|
||||
if (wsDirect != nullptr && wsDirect != ws)
|
||||
continue;
|
||||
|
||||
+11
-11
@@ -26,10 +26,10 @@ NGL_ADD_LIBRARY2(AAR SV BuildingControlVwm SHARED ${vwm_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlVwm
|
||||
PRIVATE
|
||||
ngltools
|
||||
Qt5::Xml
|
||||
Qt6::Xml
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
LtsUtilsCoreHeaderOnly
|
||||
BuildingControlCommon
|
||||
)
|
||||
@@ -41,8 +41,8 @@ NGL_TARGET_LINK_LIBRARIES(BuildingControlTestVwm
|
||||
NGLLogger
|
||||
ngltools
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt5::Xml
|
||||
Qt5::Core
|
||||
Qt6::Xml
|
||||
Qt6::Core
|
||||
BuildingControlCommon
|
||||
BuildingControlVwm
|
||||
nglcoreapplication
|
||||
@@ -51,9 +51,9 @@ NGL_TARGET_LINK_LIBRARIES(BuildingControlTestVwm
|
||||
NGL_ADD_EXECUTABLE(AAR SV BuildingControlTestVwmXml test_vwm_xml.cpp)
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlTestVwmXml
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt5::Xml
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt6::Xml
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
BuildingControlVwm
|
||||
BuildingControlCommon
|
||||
nglcoreapplication
|
||||
@@ -66,9 +66,9 @@ IF(BUILD_TESTING AND TARGET BuildingControlVwm)
|
||||
)
|
||||
ADD_EXECUTABLE(bld_vwm_math_unit_test ${test_SRCS})
|
||||
TARGET_LINK_LIBRARIES(bld_vwm_math_unit_test
|
||||
Qt5::Gui
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Gui
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
BuildingControlVwm
|
||||
BuildingControlCommon
|
||||
nglcoreapplication
|
||||
|
||||
+7
-6
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "vwm_math.h"
|
||||
#include <utility>
|
||||
#include "vwm_xml_reader.h"
|
||||
#include "vwm_building_room_geometry.h"
|
||||
#include "vwm_api.h"
|
||||
@@ -308,11 +309,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
QPolygonF footprintPoly;
|
||||
footprintPoly.reserve(footprint.size());
|
||||
for (auto coord : qAsConst(footprint))
|
||||
for (auto coord : std::as_const(footprint))
|
||||
footprintPoly << coord.toPointF();
|
||||
|
||||
double maxZ = 0;
|
||||
for(const MyRoom &room : qAsConst(rooms))
|
||||
for(const MyRoom &room : std::as_const(rooms))
|
||||
{
|
||||
TRACE_LOG(app.baseLogger()) << "Room: " << room.id
|
||||
<< ", bboxMin: " << room.bBoxMin
|
||||
@@ -368,7 +369,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
INFO_LOG(app.baseLogger()) << "******** Building '" << building.name() << "' -> checkBsmPosition using rooms";
|
||||
for(const MyRoom &myRoom : qAsConst(rooms))
|
||||
for(const MyRoom &myRoom : std::as_const(rooms))
|
||||
{
|
||||
const int roomIdToCheck = myRoom.id;
|
||||
LtsUtils::QPoint3D center = myRoom.center();
|
||||
@@ -464,7 +465,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
INFO_LOG(app.baseLogger()) << "******** Building '" << building.name() << "' -> checkBsmPosition using BSMs";
|
||||
for (const BuildingControlUnit::Bsm &bsm : qAsConst(bsmConfig.bsmMap))
|
||||
for (const BuildingControlUnit::Bsm &bsm : std::as_const(bsmConfig.bsmMap))
|
||||
{
|
||||
const auto hitPos = BuildingControlUnit::VWM::Math::checkBsmPosition(bsm.position, bsm.direction, building.rooms());
|
||||
if (hitPos.state != BuildingControlUnit::VWM::HitPosition::State::OuterWall)
|
||||
@@ -505,7 +506,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
INFO_LOG(app.baseLogger()) << "**** Building '" << building.name() << "' heightZ = " << heightZ;
|
||||
|
||||
for(const MyRoom &myRoom : qAsConst(rooms))
|
||||
for(const MyRoom &myRoom : std::as_const(rooms))
|
||||
{
|
||||
const int roomIdToCheck = myRoom.id;
|
||||
LtsUtils::QPoint3D center = myRoom.center();
|
||||
@@ -534,7 +535,7 @@ int main(int argc, char *argv[])
|
||||
<< " fine, found just one room: " << roomsWithDetonation.first();
|
||||
} else {
|
||||
QString roomIdsStr(QStringLiteral("roomIds("));
|
||||
for (auto roomId : qAsConst(roomsWithDetonation))
|
||||
for (auto roomId : std::as_const(roomsWithDetonation))
|
||||
roomIdsStr.append(QString(QStringLiteral("%1 ")).arg(roomId));
|
||||
roomIdsStr.append(QStringLiteral(")"));
|
||||
|
||||
|
||||
+8
-7
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "vwm_api.h"
|
||||
#include <utility>
|
||||
#include "vwm_deposition.h"
|
||||
#include "vwm_xml_reader.h"
|
||||
#include "vwm_state_store.h"
|
||||
@@ -216,7 +217,7 @@ void Api::dumpHitResult(const Hit &hit, const HitResult &result, const Charge &c
|
||||
output << ",," << "\n";
|
||||
|
||||
output << "RoomId,damagePercent,remainingEffectPercent,directHit" << "\n";
|
||||
for (const HitRoom &hitRoom : qAsConst(result.rooms))
|
||||
for (const HitRoom &hitRoom : std::as_const(result.rooms))
|
||||
{
|
||||
output << hitRoom.roomId << ","
|
||||
<< hitRoom.damagePercent << ","
|
||||
@@ -281,7 +282,7 @@ void Api::onSetContaminationState(const std::vector<ContaminationState> &contami
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,10,0)
|
||||
|
||||
QSet<int> roomsSet;
|
||||
for (const auto i: qAsConst(newcs.rooms))
|
||||
for (const auto i: std::as_const(newcs.rooms))
|
||||
{
|
||||
roomsSet.insert(i);
|
||||
}
|
||||
@@ -404,7 +405,7 @@ void Api::onHitCes(const qint64 effectTimeMSec, const int chargeTypeId,
|
||||
INFO_LOG(m_logger) << "XXXXX Aes hit - hit pos: " << posImpactOnGround << " direction: " << hit.direction
|
||||
<< " (p=" << hit.direction+posImpactOnGround << ")"
|
||||
<< " ; nearestWall.roomId=" << nearestWall.roomId;
|
||||
for (auto item : qAsConst(nearestWall.wallElement))
|
||||
for (auto item : std::as_const(nearestWall.wallElement))
|
||||
DEBUG_LOG(m_logger) << "Aes hit - hit pos: " << posImpactOnGround << " direction: " << hit.direction
|
||||
<< " (p=" << hit.direction+posImpactOnGround
|
||||
<< " - " << item;
|
||||
@@ -436,13 +437,13 @@ NearestWall Api::findNearestWall(const LtsUtils::QPoint3D &detonationLocation, d
|
||||
distanceOut = std::numeric_limits<double>::max();
|
||||
|
||||
INFO_LOG(m_logger) << "XXXXX searching nearest wall ...";
|
||||
for (const Room &room : qAsConst(m_building.rooms()))
|
||||
for (const Room &room : std::as_const(m_building.rooms()))
|
||||
{
|
||||
for (const OuterWall &wall : qAsConst(room.outerWalls()))
|
||||
for (const OuterWall &wall : std::as_const(room.outerWalls()))
|
||||
{
|
||||
for (const WallElement &we : qAsConst(wall.elements()))
|
||||
for (const WallElement &we : std::as_const(wall.elements()))
|
||||
{
|
||||
for (const LtsUtils::QPoint3D &p : qAsConst(we))
|
||||
for (const LtsUtils::QPoint3D &p : std::as_const(we))
|
||||
{
|
||||
const double dist = (detonationLocation - p).length();
|
||||
DEBUG_LOG(m_logger) << "Room[" << room.id() << "]: " << p << ", dist = " << dist;
|
||||
|
||||
+8
-7
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "vwm_building.h"
|
||||
#include <utility>
|
||||
#include "vwm_math.h"
|
||||
#include <QSet>
|
||||
#include <QVector>
|
||||
@@ -88,11 +89,11 @@ double Room::damagePercent() const
|
||||
|
||||
double currentProtection = 0.0;
|
||||
double initialProtection = 0.0;
|
||||
for (const OuterWall &wall : qAsConst(m_outerWalls))
|
||||
for (const OuterWall &wall : std::as_const(m_outerWalls))
|
||||
{
|
||||
currentProtection += wall.protection();
|
||||
initialProtection += wall.initialProtection();
|
||||
for (const ExclusionZone &exZone : qAsConst(wall.exclusionZones()))
|
||||
for (const ExclusionZone &exZone : std::as_const(wall.exclusionZones()))
|
||||
{
|
||||
currentProtection += exZone.protection();
|
||||
initialProtection += exZone.initialProtection();
|
||||
@@ -264,7 +265,7 @@ Building::Building()
|
||||
int Building::checkPolygons()
|
||||
{
|
||||
int numberOfDuplicates = 0;
|
||||
for (const Room &room : qAsConst(m_rooms))
|
||||
for (const Room &room : std::as_const(m_rooms))
|
||||
{
|
||||
for (int owIdx = 0; owIdx < room.outerWalls().size(); ++owIdx)
|
||||
{
|
||||
@@ -311,7 +312,7 @@ int Building::cleanupPolygons()
|
||||
<< " in room " << room.id() << " OuterWall[" << owIdx
|
||||
<< "], element[" << elemIdx << "] "
|
||||
<< " makePlanar and cleanupDublicatePointsInPolygon would generate short polygon, size=" << candidate.size();
|
||||
for (auto point : qAsConst(candidate))
|
||||
for (auto point : std::as_const(candidate))
|
||||
NOTICE_LOG(m_logger) << " point= " << point;
|
||||
|
||||
bMakePlanarDone = false;
|
||||
@@ -673,7 +674,7 @@ QMap<int, Building::NeighboursToCheck> Building::checkHitNeighbours(const QMap<i
|
||||
<< oldRe << " -> new: " << neighbour.remainingEffect();
|
||||
|
||||
|
||||
for (const NeighbourRoom &grade2Neighbour : qAsConst(neighbour.neighbours()))
|
||||
for (const NeighbourRoom &grade2Neighbour : std::as_const(neighbour.neighbours()))
|
||||
{
|
||||
if (lowerGradeNeighbours.contains(grade2Neighbour.id()) ||
|
||||
currentGradeNeighbours.contains(grade2Neighbour.id()))
|
||||
@@ -829,7 +830,7 @@ double MakePlanar::ratioOfSmallestAndBiggestDimension()
|
||||
rangeX.min = m_poly.first().x(); rangeX.max = m_poly.first().x();
|
||||
rangeY.min = m_poly.first().y(); rangeY.max = m_poly.first().y();
|
||||
rangeZ.min = m_poly.first().z(); rangeZ.max = m_poly.first().z();
|
||||
for (const LtsUtils::QPoint3D &pnt : qAsConst(m_poly))
|
||||
for (const LtsUtils::QPoint3D &pnt : std::as_const(m_poly))
|
||||
{
|
||||
rangeX.min = std::min(rangeX.min, pnt.x());
|
||||
rangeX.max = std::max(rangeX.max, pnt.x());
|
||||
@@ -890,7 +891,7 @@ void wallElementToBottomLeftTopRight3D(const WallElement &wallElement,
|
||||
const LtsUtils::QPoint3D &frontItem = wallElement.front();
|
||||
bottomLeftOut = frontItem;
|
||||
topRightOut = frontItem;
|
||||
for (auto coord : qAsConst(wallElement))
|
||||
for (auto coord : std::as_const(wallElement))
|
||||
{
|
||||
if (coord.x() < bottomLeftOut.x())
|
||||
bottomLeftOut.setX(coord.x());
|
||||
|
||||
+12
-11
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "vwm_math.h"
|
||||
#include <utility>
|
||||
|
||||
#include <logger.h>
|
||||
|
||||
@@ -278,7 +279,7 @@ static inline bool getHitPositionInternal(const QVector<LtsUtils::QPoint3D> &pla
|
||||
ERROR_LOG(l) << "planePoints are not sufficiant";
|
||||
for (auto coord : planePoints)
|
||||
ERROR_LOG(l) << "planePoints are not sufficiant: << " << coord;
|
||||
for (auto coord : qAsConst(localPoly))
|
||||
for (auto coord : std::as_const(localPoly))
|
||||
ERROR_LOG(l) << "localPoly are not sufficiant: << " << coord;
|
||||
return false;
|
||||
}
|
||||
@@ -453,12 +454,12 @@ HitPosition checkBsmPosition(const LtsUtils::QPoint3D &position, const LtsUtils:
|
||||
ERROR_LOG(l) << "localWallElement are not sufficiant";
|
||||
for (auto coord : wallElement)
|
||||
ERROR_LOG(l) << "wallElement are not sufficiant: << " << coord;
|
||||
for (auto coord : qAsConst(localWallElement))
|
||||
for (auto coord : std::as_const(localWallElement))
|
||||
ERROR_LOG(l) << "localWallElement are not sufficiant: << " << coord;
|
||||
continue;
|
||||
}
|
||||
|
||||
for (auto pointOfWallElementLinear : qAsConst(localWallElement))
|
||||
for (auto pointOfWallElementLinear : std::as_const(localWallElement))
|
||||
DEBUG_LOG(l) << "room[" << room.id() << "]" << " wall[" << idxOuterWall << "] " << " wallElement[" << idxWallElement << "] #points = " << localWallElement.size() << ", pointOfWallElementLinear=" << pointOfWallElementLinear;
|
||||
|
||||
const VwmPlane vwmPlaneOW(localWallElement.at(0), localWallElement.at(1), localWallElement.at(2));
|
||||
@@ -537,9 +538,9 @@ LtsUtils::QPoint3D getIntersectionInternal(
|
||||
if (localPoly.size() < 3)
|
||||
{
|
||||
ERROR_LOG(l) << "planePoints are not sufficiant";
|
||||
for (auto coord : qAsConst(planePoints))
|
||||
for (auto coord : std::as_const(planePoints))
|
||||
ERROR_LOG(l) << "planePoints are not sufficiant: << " << coord;
|
||||
for (auto coord : qAsConst(localPoly))
|
||||
for (auto coord : std::as_const(localPoly))
|
||||
ERROR_LOG(l) << "localPoly are not sufficiant: << " << coord;
|
||||
return invalidPosition();
|
||||
}
|
||||
@@ -592,9 +593,9 @@ LtsUtils::QPoint3D intersection(const LtsUtils::QPoint3D &start, const LtsUtils:
|
||||
|
||||
int cnt = 0;
|
||||
int roomId4Debugging = 1;
|
||||
for (const Room &room : qAsConst(rooms))
|
||||
for (const OuterWall &outerWall : qAsConst(room.outerWalls()))
|
||||
for (const WallElement &wallElement : qAsConst(outerWall.elements()))
|
||||
for (const Room &room : std::as_const(rooms))
|
||||
for (const OuterWall &outerWall : std::as_const(room.outerWalls()))
|
||||
for (const WallElement &wallElement : std::as_const(outerWall.elements()))
|
||||
{
|
||||
const LtsUtils::QPoint3D point = getIntersectionInternal(wallElement, start, direction);
|
||||
DEBUG_LOG(l) << "getIntersectionInternal:"
|
||||
@@ -628,9 +629,9 @@ bool hasIntersection(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &
|
||||
{
|
||||
const double distance = (end - start).length();
|
||||
const LtsUtils::QPoint3D direction = (end - start).normalized();
|
||||
for (const Room &room : qAsConst(rooms))
|
||||
for (const OuterWall &outerWall : qAsConst(room.outerWalls()))
|
||||
for (const WallElement &wallElement : qAsConst(outerWall.elements()))
|
||||
for (const Room &room : std::as_const(rooms))
|
||||
for (const OuterWall &outerWall : std::as_const(room.outerWalls()))
|
||||
for (const WallElement &wallElement : std::as_const(outerWall.elements()))
|
||||
{
|
||||
const LtsUtils::QPoint3D point = getIntersectionInternal(wallElement, start, direction);
|
||||
if (point == invalidPosition())
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "vwm_state_store.h"
|
||||
#include <utility>
|
||||
#include <logger.h>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
@@ -81,7 +82,7 @@ static inline QJsonArray writeContaminationStates(const QMap<int, ContaminationS
|
||||
for (const auto &value : contaminationStates.values() )
|
||||
{
|
||||
QJsonArray roomArr;
|
||||
for (const auto & roomId : qAsConst(value.rooms))
|
||||
for (const auto & roomId : std::as_const(value.rooms))
|
||||
roomArr.append(QJsonValue(roomId));
|
||||
|
||||
contaminationArr.append(QJsonObject({ {QStringLiteral("aesId") , value.aesId},
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <utility>
|
||||
#include <QMap>
|
||||
#include <QVector>
|
||||
#include <cstdint>
|
||||
@@ -71,7 +72,7 @@ inline std::ostream &operator<< (std::ostream &stream, const Hit &hit)
|
||||
<< ", damageStateOverride = " << hit.damageStateOverride;
|
||||
|
||||
stream << ", affectedRoomIds = (";
|
||||
for (int id : qAsConst(hit.affectedRoomIds))
|
||||
for (int id : std::as_const(hit.affectedRoomIds))
|
||||
stream << id << ",";
|
||||
stream << ")";
|
||||
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "main_handler.h"
|
||||
#include <utility>
|
||||
#include <QWebSocket>
|
||||
#include "VWM/vwm_types.h"
|
||||
#include "bcu_xml_reader.h"
|
||||
@@ -180,7 +181,7 @@ void MainHandler::onHitResult(const HitResult &result, const QMap<int, Contamina
|
||||
|
||||
if (playSound)
|
||||
{
|
||||
for (HandelEffects *he : qAsConst(m_handelEffectsVec))
|
||||
for (HandelEffects *he : std::as_const(m_handelEffectsVec))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "playHitSound @EGCU " << he->hostname() << ", SoundId: " << result.effectSoundId;
|
||||
he->playHitSound(result.effectSoundId);
|
||||
@@ -252,7 +253,7 @@ void MainHandler::onSetEffectStatesRequest(const QString &hostname, const QVecto
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (HandelEffects* hes : qAsConst(m_handelEffectsVec))
|
||||
for (HandelEffects* hes : std::as_const(m_handelEffectsVec))
|
||||
{
|
||||
if (hes->hostname() != hostname)
|
||||
continue;
|
||||
@@ -309,7 +310,7 @@ QVector<int> MainHandler::getSegmentDamage(const QVector<HitRoom> &allHitRooms,
|
||||
return result;
|
||||
result.reserve(m_egcuConfig.egcus.size());
|
||||
|
||||
for (const Egcu &egcu : qAsConst(m_egcuConfig.egcus))
|
||||
for (const Egcu &egcu : std::as_const(m_egcuConfig.egcus))
|
||||
{
|
||||
int damagePercentSegment = 0;
|
||||
for (const HitRoom &hr : allHitRooms)
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "web_socket_telegrams.h"
|
||||
#include <utility>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
@@ -252,7 +253,7 @@ QByteArray SetContaminationState::toJson() const
|
||||
for (const auto &cs : contaminationStates )
|
||||
{
|
||||
QJsonArray roomArr;
|
||||
for (const auto & roomId : qAsConst(cs.rooms))
|
||||
for (const auto & roomId : std::as_const(cs.rooms))
|
||||
roomArr.append(QJsonValue(roomId));
|
||||
|
||||
contaminationArr.append(QJsonObject({ {s_aesId(), cs.aesId},
|
||||
|
||||
@@ -44,7 +44,7 @@ NGL_TARGET_LINK_LIBRARIES(svcBldCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddscore
|
||||
ngldb
|
||||
svcPdmCommon
|
||||
@@ -153,9 +153,9 @@ CODEGEN_SQL(SRCS_exe ${xml_FILE})
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcBuildings ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcBuildings
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::WebSockets
|
||||
BuildingControlCommon
|
||||
svcBldCommon
|
||||
svcAsmClient
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "building_control_handler.h"
|
||||
#include <utility>
|
||||
#include "building_process.h"
|
||||
#include "main_handler.h"
|
||||
#include <QCoreApplication>
|
||||
@@ -30,7 +31,7 @@ BuildingControlHandler::BuildingControlHandler(MainHandler *mainHandler)
|
||||
|
||||
BuildingControlHandler::~BuildingControlHandler()
|
||||
{
|
||||
for (BuildingProcess *bldg : qAsConst(m_buildings))
|
||||
for (BuildingProcess *bldg : std::as_const(m_buildings))
|
||||
{
|
||||
bldg->shutdown();
|
||||
delete bldg;
|
||||
@@ -275,7 +276,7 @@ void BuildingControlHandler::onRelayInfoChanged(const AssetManagement::RelayInfo
|
||||
else
|
||||
m_relayInfos.remove(info.id());
|
||||
|
||||
for(auto *bldg : qAsConst(m_buildings))
|
||||
for(auto *bldg : std::as_const(m_buildings))
|
||||
bldg->newRelayInfos(m_relayInfos);
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
|
||||
#include "building_process.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
#include "BuildingControlUnit/ControlEffects/xmlreader.h"
|
||||
|
||||
@@ -30,7 +31,7 @@ QStringList idsToStringList(const std::vector< int32_t >& ids)
|
||||
{
|
||||
QStringList sl;
|
||||
sl.reserve(ids.size());
|
||||
for (const auto &id : qAsConst(ids))
|
||||
for (const auto &id : std::as_const(ids))
|
||||
sl.append(QString::number(id));
|
||||
return sl;
|
||||
}
|
||||
@@ -299,7 +300,7 @@ bool BuildingProcess::setEffectStates( const int assetId, const QByteArray &prop
|
||||
|
||||
if (assetId > 0)
|
||||
{
|
||||
for (const EgcuInfo &egcu : qAsConst(m_buildingInfo.egcus))
|
||||
for (const EgcuInfo &egcu : std::as_const(m_buildingInfo.egcus))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "EGCU: " << egcu.assetName
|
||||
<< " assetId=" << egcu.assetId
|
||||
@@ -359,7 +360,7 @@ bool BuildingProcess::setEffectStates( const int assetId, const QByteArray &prop
|
||||
bcuEffectState.effectOverride = static_cast<BuildingControlUnit::BcuEffectOverride>(value);
|
||||
tele.effectStates.append(bcuEffectState);
|
||||
}
|
||||
for (int relayId : qAsConst(allRelayIds))
|
||||
for (int relayId : std::as_const(allRelayIds))
|
||||
{
|
||||
BuildingControlUnit::BcuEffectState bcuEffectState;
|
||||
bcuEffectState.id = relayId;
|
||||
@@ -542,7 +543,7 @@ bool BuildingProcess::switchRelay(const SwitchRelayRequest &data)
|
||||
<< data.state();
|
||||
|
||||
|
||||
for (const EgcuInfo &egcu : qAsConst(m_buildingInfo.egcus))
|
||||
for (const EgcuInfo &egcu : std::as_const(m_buildingInfo.egcus))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "EGCU: " << egcu.assetName
|
||||
<< " assetId=" << egcu.assetId
|
||||
@@ -810,7 +811,7 @@ void BuildingProcess::handleReconnectEgcu(const QString &segment)
|
||||
|
||||
DEBUG_LOG(m_logger) << "handleReconnectEgcu segment =" << segment;
|
||||
|
||||
for (const EgcuInfo &egcu : qAsConst(m_buildingInfo.egcus))
|
||||
for (const EgcuInfo &egcu : std::as_const(m_buildingInfo.egcus))
|
||||
{
|
||||
if (QString::compare(egcu.hostname, segment, Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
@@ -867,7 +868,7 @@ void BuildingProcess::handleRelayState(BuildingControlUnit::Json::Telegrams::Rel
|
||||
}
|
||||
|
||||
|
||||
for (const EgcuInfo &egcu : qAsConst(m_buildingInfo.egcus))
|
||||
for (const EgcuInfo &egcu : std::as_const(m_buildingInfo.egcus))
|
||||
{
|
||||
if (QString::compare(egcu.hostname,tel->segment, Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
@@ -883,7 +884,7 @@ void BuildingProcess::handleRelayState(BuildingControlUnit::Json::Telegrams::Rel
|
||||
}
|
||||
|
||||
RelayStateItem item;
|
||||
for (const auto &info : qAsConst(tel->relayStates))
|
||||
for (const auto &info : std::as_const(tel->relayStates))
|
||||
{
|
||||
item.id(info.id);
|
||||
item.state(info.state);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_handler.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
#include <QTimer>
|
||||
#include <QJsonDocument>
|
||||
@@ -274,7 +275,7 @@ void IsmHandler::buildingsChanged(bool init)
|
||||
QMap<int, BuildingInfo> newBuildingConfiguration;
|
||||
availableBuildingIds.reserve(m_mainStructureElements.size());
|
||||
INFO_LOG(m_logger) << "Updating building config m_mainStructureElements.size=" << m_mainStructureElements.size();
|
||||
for (const InfrastructureManagement::MainStructureElement &mse : qAsConst(m_mainStructureElements))
|
||||
for (const InfrastructureManagement::MainStructureElement &mse : std::as_const(m_mainStructureElements))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Checking building " << mse.id() << " - " << mse.name();
|
||||
BuildingInfo bi;
|
||||
@@ -512,7 +513,7 @@ void IsmHandler::checkOverride(const InfrastructureManagement::MainStructureElem
|
||||
<< " id=" << bi.mseId
|
||||
<< " assetId=" << bi.assetId
|
||||
<< " egcus.size=" << bi.egcus.size();
|
||||
for (const auto &egcu : qAsConst(bi.egcus))
|
||||
for (const auto &egcu : std::as_const(bi.egcus))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AssetId=" << egcu.assetId
|
||||
<< " assetName=" << egcu.assetName
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "web_socket_handler.h"
|
||||
#include <utility>
|
||||
#include "building_process.h"
|
||||
|
||||
#include <QWebSocket>
|
||||
@@ -23,7 +24,7 @@ WebSocketHandler::WebSocketHandler(const std::shared_ptr<BuildingControlHandler>
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{
|
||||
for (const auto& ws : qAsConst(m_webSockets))
|
||||
for (const auto& ws : std::as_const(m_webSockets))
|
||||
{
|
||||
ws->disconnect(this);
|
||||
}
|
||||
@@ -71,7 +72,7 @@ bool WebSocketHandler::sendTelegramInternal() const
|
||||
const QString jsonStr = QString::fromUtf8(QJsonDocument(obj).toJson(QJsonDocument::Compact));
|
||||
|
||||
bool ret = false;
|
||||
for (const auto &wsw : qAsConst(m_webSockets))
|
||||
for (const auto &wsw : std::as_const(m_webSockets))
|
||||
{
|
||||
if (wsw->sendTextMessage(jsonStr))
|
||||
ret = true;
|
||||
@@ -108,7 +109,7 @@ bool WebSocketHandler::sendbuildingInfos() const
|
||||
const QString jsonStr = QString::fromUtf8(QJsonDocument(obj).toJson(QJsonDocument::Compact));
|
||||
|
||||
bool ret = false;
|
||||
for (const auto &wsw : qAsConst(m_webSockets))
|
||||
for (const auto &wsw : std::as_const(m_webSockets))
|
||||
{
|
||||
if (wsw->sendTextMessage(jsonStr))
|
||||
ret = true;
|
||||
|
||||
@@ -17,17 +17,26 @@ ENDIF()
|
||||
# ADD_SUBDIRECTORY(HighLevelArchitecture)
|
||||
#ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(Buildings)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(Buildings)
|
||||
ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(WarehouseManagement)
|
||||
# TrainingAreaBase is a core dependency - always include it when Proxies is included
|
||||
ADD_SUBDIRECTORY(TrainingAreaBase) # sql
|
||||
ADD_SUBDIRECTORY(TrainingAreaBaseOC)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(TrainingAreaBaseOC)
|
||||
ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(CombatNetRadio)
|
||||
ADD_SUBDIRECTORY(DifferentialGPS)
|
||||
ADD_SUBDIRECTORY(GuezNasat) # rpcgen
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(GuezNasat) # rpcgen
|
||||
ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(ComponentMonitor)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(ComponentMonitor)
|
||||
ENDIF()
|
||||
|
||||
IF (BUILD_WLS)
|
||||
ADD_SUBDIRECTORY(WirelessLocationSystem)
|
||||
|
||||
@@ -26,7 +26,7 @@ NGL_TARGET_LINK_LIBRARIES(svcCnrHelper
|
||||
# ddsfts
|
||||
PUBLIC
|
||||
svcAvmCommon
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
# svcAesCommon
|
||||
# ngldb
|
||||
)
|
||||
@@ -91,9 +91,9 @@ NGL_TARGET_LINK_LIBRARIES(svcCombatNetRadio
|
||||
LtsUtilsCore
|
||||
nglcoreapplication
|
||||
NGLLogger
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
ngltools
|
||||
svcCoreClient
|
||||
svcCnrHelper
|
||||
|
||||
+3
-2
@@ -1,4 +1,5 @@
|
||||
#include "cnr_frequency_planning_helper.h"
|
||||
#include <utility>
|
||||
#include <AudioVideoManagement/avm_translation.h>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
@@ -187,7 +188,7 @@ QVector<RadioCircuit*> fromJson(const std::string &json)
|
||||
|
||||
|
||||
|
||||
for(const QJsonValue &val : qAsConst(arr))
|
||||
for(const QJsonValue &val : std::as_const(arr))
|
||||
{
|
||||
RadioCircuit *rc = nullptr;
|
||||
const QJsonObject obj = val.toObject();
|
||||
@@ -230,7 +231,7 @@ QSet<int> frequencySetDataIds(const std::string &frequencyPlanDataProperties)
|
||||
QJsonArray arr = doc.object().value(QStringLiteral("subCircuits")).toArray();
|
||||
|
||||
|
||||
for(const QJsonValue &val : qAsConst(arr))
|
||||
for(const QJsonValue &val : std::as_const(arr))
|
||||
{
|
||||
const QJsonObject obj = val.toObject();
|
||||
FrequencyBand ft = static_cast<FrequencyBand::inner_enum>(obj[QStringLiteral("FrequencyBand")].toInt());
|
||||
|
||||
+4
-3
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "connection_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include "client_connection.h"
|
||||
|
||||
@@ -17,7 +18,7 @@ ConnectionHandler::ConnectionHandler()
|
||||
|
||||
ConnectionHandler::~ConnectionHandler()
|
||||
{
|
||||
for (auto s : qAsConst(m_connections))
|
||||
for (auto s : std::as_const(m_connections))
|
||||
s->disconnect(this);
|
||||
qDeleteAll(m_connections);
|
||||
}
|
||||
@@ -52,7 +53,7 @@ bool ConnectionHandler::init()
|
||||
void ConnectionHandler::onUpdate()
|
||||
{
|
||||
emit clearFrequencyPlanningStatus();
|
||||
for (ClientConnection *currentConnection : qAsConst(m_connections))
|
||||
for (ClientConnection *currentConnection : std::as_const(m_connections))
|
||||
currentConnection->addMessage(Messages::UpdateMessage());
|
||||
}
|
||||
|
||||
@@ -103,6 +104,6 @@ void ConnectionHandler::onDisconnected(ClientConnection *conn)
|
||||
|
||||
void ConnectionHandler::onPositions(const CombatNetRadio::WebSocketInterface::Messages::ReplyMessage &positionsCnr)
|
||||
{
|
||||
for (ClientConnection *currentConnection : qAsConst(m_connections))
|
||||
for (ClientConnection *currentConnection : std::as_const(m_connections))
|
||||
currentConnection->addMessage(positionsCnr);
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "config_cnr.h"
|
||||
#include <utility>
|
||||
#include "helper.h"
|
||||
#include <AudioVideoManagement/avm_dtc.h>
|
||||
#include <AudioVideoManagement/avm_translation.h>
|
||||
@@ -56,7 +57,7 @@ void ConfigCnr::buildConfigCnrData()
|
||||
|
||||
AudioVideoManagement::FrequencySet frequencySet = m_avmDtc->frequencySet(plan->frequencySetId());
|
||||
QMap<int, AudioVideoManagement::FrequencySetDataWithId> fsdMap;
|
||||
for (const auto &fsd : qAsConst(frequencySet.data()))
|
||||
for (const auto &fsd : std::as_const(frequencySet.data()))
|
||||
fsdMap.insert(fsd.id(), fsd);
|
||||
|
||||
configCnr.setId = plan->frequencySetId();
|
||||
@@ -72,7 +73,7 @@ void ConfigCnr::buildConfigCnrData()
|
||||
QVector<AudioVideoManagement::RadioCircuit*> circuits = AudioVideoManagement::fromJson(currentData.properties());
|
||||
|
||||
int subCircuitCount = 0;
|
||||
for (AudioVideoManagement::RadioCircuit* circuit : qAsConst(circuits))
|
||||
for (AudioVideoManagement::RadioCircuit* circuit : std::as_const(circuits))
|
||||
{
|
||||
|
||||
InfrastructureManagement::MainStructureElement radioStation = m_ismDtc->mainStructureElement(circuit->radioStationId);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "positions_cnr.h"
|
||||
#include <utility>
|
||||
#include "exercise_manager.h"
|
||||
#include "helper.h"
|
||||
#include <AudioVideoManagement/avm_dtc.h>
|
||||
@@ -105,7 +106,7 @@ QVector<WebSocketInterface::Messages::ReplyMessage::LonLatPoint> PositionsCnr::p
|
||||
const qint64 now = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
QVector<WebSocketInterface::Messages::ReplyMessage::LonLatPoint> positions;
|
||||
for (int participantId : qAsConst(participantIdsInUnit))
|
||||
for (int participantId : std::as_const(participantIdsInUnit))
|
||||
{
|
||||
const ParticipantManagement::Participant &participant = allParticipants.value(participantId);
|
||||
if (!participant.equipmentNumber().is_set())
|
||||
|
||||
@@ -42,7 +42,7 @@ NGL_TARGET_LINK_LIBRARIES(svcCmoCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddscore
|
||||
ngldb
|
||||
NGLLogger
|
||||
@@ -136,8 +136,8 @@ CODEGEN_SQL(SRCS_exe ${xml_FILE})
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(SV svcComponentMonitor ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcComponentMonitor
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
svcCmoCommon
|
||||
svcCmoServer
|
||||
svcCoreClient # pacemaker
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "checkmk_handler_schedule_check.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QTimer>
|
||||
#include <QHostAddress>
|
||||
@@ -132,7 +133,7 @@ bool CheckmkHandlerScheduleCheck::writeScheduleUpdateRequest()
|
||||
#endif
|
||||
|
||||
int bWrittenAll = 0;
|
||||
for (const QString &hostname : qAsConst(hosts))
|
||||
for (const QString &hostname : std::as_const(hosts))
|
||||
{
|
||||
qint64 now = QDateTime::currentSecsSinceEpoch();
|
||||
|
||||
@@ -198,7 +199,7 @@ void CheckmkHandlerScheduleCheck::onTriggerUpdateRequest(const rti::core::Sample
|
||||
sl.reserve(hostnames.size());
|
||||
|
||||
QString temp;
|
||||
for (const std::string &str : qAsConst(hostnames))
|
||||
for (const std::string &str : std::as_const(hostnames))
|
||||
{
|
||||
temp = QString::fromStdString(str);
|
||||
if (!sl.contains(temp))
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "component_status_handler.h"
|
||||
#include <utility>
|
||||
#include "dds_handler.h"
|
||||
#include <ComponentMonitor/cmo.hpp>
|
||||
#include <ComponentMonitor/cmo_dts.h>
|
||||
@@ -149,7 +150,7 @@ void ComponentStatusHandler::dump()
|
||||
counter = 0;
|
||||
DEBUG_LOG(m_logger) << " +++++++++++++++++++++++++++++++++++++++++++++";
|
||||
DEBUG_LOG(m_logger) << " REACHABLE:";
|
||||
for (const ComponentStatus &status : qAsConst(m_statusMap))
|
||||
for (const ComponentStatus &status : std::as_const(m_statusMap))
|
||||
{
|
||||
if (status.state().underlying() == ComponentState_def::Reachable)
|
||||
{
|
||||
@@ -163,7 +164,7 @@ void ComponentStatusHandler::dump()
|
||||
counter = 0;
|
||||
DEBUG_LOG(m_logger) << " +++++++++++++++++++++++++++++++++++++++++++++";
|
||||
DEBUG_LOG(m_logger) << " UNREACHABLE:";
|
||||
for (const ComponentStatus &status : qAsConst(m_statusMap))
|
||||
for (const ComponentStatus &status : std::as_const(m_statusMap))
|
||||
{
|
||||
if (status.state().underlying() == ComponentState_def::Unreachable)
|
||||
{
|
||||
@@ -177,7 +178,7 @@ void ComponentStatusHandler::dump()
|
||||
counter = 0;
|
||||
DEBUG_LOG(m_logger) << " +++++++++++++++++++++++++++++++++++++++++++++";
|
||||
DEBUG_LOG(m_logger) << " UNDEFINED:";
|
||||
for (const ComponentStatus &status : qAsConst(m_statusMap))
|
||||
for (const ComponentStatus &status : std::as_const(m_statusMap))
|
||||
{
|
||||
if (status.state().underlying() == ComponentState_def::Undefined)
|
||||
{
|
||||
|
||||
@@ -15,8 +15,8 @@ SET(if_SRCS
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV Tetra_Interface ${if_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(Tetra_Interface
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
CoPrtCnv
|
||||
NGLLogger
|
||||
)
|
||||
@@ -47,8 +47,8 @@ NGL_TARGET_LINK_LIBRARIES(svcDifferentialGPS
|
||||
ddsconnector
|
||||
svcCoreClient
|
||||
Tetra_Interface
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
CoPrtCnv
|
||||
LtsCommandLineParser
|
||||
NGLLogger
|
||||
@@ -63,6 +63,6 @@ NGL_INSTALL(AAR SV FILES dgps.ini DESTINATION bin RENAME dgps.ini.distrib)
|
||||
#
|
||||
NGL_ADD_EXECUTABLE(AAR SV Tetra_dgps_simulator Simulator/main_sim.cpp Simulator/main_sim.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(Tetra_dgps_simulator
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
)
|
||||
@@ -24,8 +24,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(cesTestsGasPipe
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(feedGeoJson ${FEED_GEO_JSON})
|
||||
TARGET_LINK_LIBRARIES(feedGeoJson
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
svcAesClient
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
|
||||
#include "websocket_server.h"
|
||||
#include <utility>
|
||||
#include <QDebug>
|
||||
|
||||
WebSocketServer::WebSocketServer(quint16 port, QObject *parent)
|
||||
@@ -40,7 +41,7 @@ void WebSocketServer::onTextMessageReceived(QString message) {
|
||||
qDebug() << "Received message:" << message;
|
||||
|
||||
|
||||
for (QWebSocket *client : qAsConst(m_clients)) {
|
||||
for (QWebSocket *client : std::as_const(m_clients)) {
|
||||
if (client->isValid())
|
||||
client->sendTextMessage(message);
|
||||
}
|
||||
@@ -58,7 +59,7 @@ void WebSocketServer::onSocketDisconnected() {
|
||||
void WebSocketServer::sendMessage(QString message)
|
||||
{
|
||||
qDebug() << "sendMessage";
|
||||
for (QWebSocket *client : qAsConst(m_clients)) {
|
||||
for (QWebSocket *client : std::as_const(m_clients)) {
|
||||
if (client->isValid())
|
||||
client->sendTextMessage(message);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ NGL_TARGET_LINK_LIBRARIES(svcGnaCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ngldb
|
||||
ddscore
|
||||
NGLLogger
|
||||
@@ -113,9 +113,9 @@ NGL_ADD_LIBRARY(AAR SV svcGnaServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcGnaServer
|
||||
PRIVATE
|
||||
ddsfts
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
LtsCoordTrans
|
||||
NGLLogger
|
||||
nglsettings
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "handler_nasat_aircraft.h"
|
||||
#include <utility>
|
||||
#include "initialization.h"
|
||||
#include "dds_handler.h"
|
||||
#include "handler_nasat_aircraft_participant.h"
|
||||
@@ -41,7 +42,7 @@ HandlerNasatAircraft::HandlerNasatAircraft(Initialization *mainHandler)
|
||||
|
||||
HandlerNasatAircraft::~HandlerNasatAircraft()
|
||||
{
|
||||
for (const auto &data : qAsConst(m_nasatAircrafts))
|
||||
for (const auto &data : std::as_const(m_nasatAircrafts))
|
||||
m_dts->removeNasatAircraftByKey(data.id());
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "handler_nasat_aircraft_participant.h"
|
||||
#include <utility>
|
||||
#include "handler_nasat_aircraft.h"
|
||||
#include "initialization.h"
|
||||
#include "dds_handler.h"
|
||||
@@ -47,7 +48,7 @@ HandlerNasatAircraftParticipant::HandlerNasatAircraftParticipant(Initialization
|
||||
HandlerNasatAircraftParticipant::~HandlerNasatAircraftParticipant()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
for (const auto &data : qAsConst(m_nasatAircraftParticipants))
|
||||
for (const auto &data : std::as_const(m_nasatAircraftParticipants))
|
||||
m_dts->removeNasatAircraftByKey(data.id());
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
@@ -304,7 +305,7 @@ int HandlerNasatAircraftParticipant::removeNapsOfExercise(int exerciseId)
|
||||
int count = 0;
|
||||
QHash<int, NasatAircraftParticipant> napsCopy = m_nasatAircraftParticipants;
|
||||
|
||||
for (const NasatAircraftParticipant &nap : qAsConst(napsCopy))
|
||||
for (const NasatAircraftParticipant &nap : std::as_const(napsCopy))
|
||||
{
|
||||
if (nap.exerciseId() == exerciseId)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "handler_participant.h"
|
||||
#include <utility>
|
||||
#include "handler_nasat_aircraft.h"
|
||||
#include "handler_nasat_aircraft_participant.h"
|
||||
#include "initialization.h"
|
||||
@@ -56,7 +57,7 @@ HandlerParticipant::HandlerParticipant(Initialization *mainHandler)
|
||||
|
||||
HandlerParticipant::~HandlerParticipant()
|
||||
{
|
||||
for (const auto &ex : qAsConst(m_activePublisher))
|
||||
for (const auto &ex : std::as_const(m_activePublisher))
|
||||
qDeleteAll(ex);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "web_socket_handler.h"
|
||||
#include <utility>
|
||||
#include "guez_nasat_telegrams.h"
|
||||
#include <QWebSocket>
|
||||
|
||||
@@ -24,7 +25,7 @@ WebSocketHandler::WebSocketHandler(QObject *parent)
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
for (auto s : qAsConst(m_webSockets))
|
||||
for (auto s : std::as_const(m_webSockets))
|
||||
{
|
||||
s->disconnect(this);
|
||||
s->close();
|
||||
@@ -71,7 +72,7 @@ bool WebSocketHandler::sendTelegramInternal(const QByteArray &tele)
|
||||
{
|
||||
const QString msg = QString::fromUtf8(tele);
|
||||
bool bOk = false;
|
||||
for (QWebSocket *ws : qAsConst(m_webSockets))
|
||||
for (QWebSocket *ws : std::as_const(m_webSockets))
|
||||
{
|
||||
if (ws->sendTextMessage(msg))
|
||||
bOk = true;
|
||||
|
||||
+3
-3
@@ -98,9 +98,9 @@ NGL_TARGET_LINK_LIBRARIES(svcHighLevelArchitecture
|
||||
nglcoreapplication
|
||||
NGLLogger
|
||||
nglsettings
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
svcAesClient
|
||||
svcCoreClient
|
||||
svcExmClient
|
||||
|
||||
+4
-3
@@ -3,6 +3,7 @@
|
||||
|
||||
|
||||
#include "ngs_connector.h"
|
||||
#include <utility>
|
||||
#include "ngs_handler.h"
|
||||
#include "ppm_handler.h"
|
||||
#include "damage_model.h"
|
||||
@@ -354,7 +355,7 @@ void NgsConnector::unsubscribeFromNgs()
|
||||
rpr2::IObserverWeaponFireIntClass &wf = m_somPlayer->getObserverWeaponFireIntClass(*m_iaWeaponFireCallback);
|
||||
wf.unsubscribe();
|
||||
}
|
||||
for (rpr2::IPlayerBaseEntityObjInstance *player : qAsConst(m_playerMap))
|
||||
for (rpr2::IPlayerBaseEntityObjInstance *player : std::as_const(m_playerMap))
|
||||
player->deleteObjectInstance(getSimTime());
|
||||
|
||||
m_playerMap.clear();
|
||||
@@ -959,7 +960,7 @@ QPolygonF NgsConnector::utmToGeogrphic(const QPolygonF &polyUtm, const LtsCoordT
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -1459,7 +1460,7 @@ void NgsConnector::onNewEventReport(const rpr2::IObserverEventReportIntInstance
|
||||
vecGears.reserve(gears.size());
|
||||
|
||||
QString gearsString;
|
||||
for (const auto &gear : qAsConst(gears))
|
||||
for (const auto &gear : std::as_const(gears))
|
||||
{
|
||||
vecGears.push_back(gear);
|
||||
gearsString.append(tr("[GearId: %1, GearTypeId; %2] ").arg(gear.gearId()).arg(gear.gearTypeId()));
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ngs_handler.h"
|
||||
#include <utility>
|
||||
#include <Common/logger.h>
|
||||
#include "ngs_connector.h"
|
||||
#include "socketreader.h"
|
||||
@@ -100,7 +101,7 @@ void NgsHandler::initSocketReaders()
|
||||
|
||||
void NgsHandler::deInitSocketReaders()
|
||||
{
|
||||
for (SocketReader *sr : qAsConst(m_socketReaders))
|
||||
for (SocketReader *sr : std::as_const(m_socketReaders))
|
||||
sr->stopThread();
|
||||
m_socketReaders.clear();
|
||||
}
|
||||
|
||||
+7
-6
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ppm_handler.h"
|
||||
#include <utility>
|
||||
#include "ngs_handler.h"
|
||||
#include <Common/participantinformation.h>
|
||||
|
||||
@@ -158,7 +159,7 @@ int PpmHandler::getEquipmentNo(int participantId) const
|
||||
|
||||
int PpmHandler::getParticipantIdByExternalId(int externalId) const
|
||||
{
|
||||
for(const auto &part : qAsConst(m_partData))
|
||||
for(const auto &part : std::as_const(m_partData))
|
||||
{
|
||||
if (part.externalId() == externalId)
|
||||
return part.id();
|
||||
@@ -415,7 +416,7 @@ void PpmHandler::startPublishToNgs()
|
||||
|
||||
INFO_LOG(m_logger) << "(Re)Adding all players, size: " << m_partData.size();
|
||||
|
||||
for (const ParticipantManagement::Participant &participant : qAsConst(m_partData))
|
||||
for (const ParticipantManagement::Participant &participant : std::as_const(m_partData))
|
||||
createParticipant(participant);
|
||||
}
|
||||
|
||||
@@ -680,7 +681,7 @@ ProjectDataManagement::ChargeType PpmHandler::chargeTypeFromDisEntity(const std:
|
||||
m_chargeTypes = m_dtcPdm->chargeTypes();
|
||||
}
|
||||
|
||||
for (const auto &item : qAsConst(m_chargeTypes))
|
||||
for (const auto &item : std::as_const(m_chargeTypes))
|
||||
{
|
||||
if (item.disEntity() == disEntity)
|
||||
return item;
|
||||
@@ -696,7 +697,7 @@ ProjectDataManagement::ChargeType PpmHandler::chargeTypeFromTasCodeDirect(int32_
|
||||
m_chargeTypes = m_dtcPdm->chargeTypes();
|
||||
}
|
||||
|
||||
for (const auto &item : qAsConst(m_chargeTypes))
|
||||
for (const auto &item : std::as_const(m_chargeTypes))
|
||||
{
|
||||
if (item.legacyId() == tasCode)
|
||||
return item;
|
||||
@@ -713,7 +714,7 @@ int PpmHandler::gearTypeIdFromChargeTypeId(int chargeTypeId)
|
||||
}
|
||||
|
||||
int gearTypeId = 999999999;
|
||||
for (const auto &item : qAsConst(m_gearTypeChargeTypes))
|
||||
for (const auto &item : std::as_const(m_gearTypeChargeTypes))
|
||||
{
|
||||
if (item.chargeTypeId() == chargeTypeId)
|
||||
if (item.gearTypeId() < gearTypeId)
|
||||
@@ -834,7 +835,7 @@ int PpmHandler::partyIdFromForceIdentifier(rpr2::ForceIdentifierEnum8::ET fi)
|
||||
m_partyData = m_dtcPpm->partys();
|
||||
}
|
||||
|
||||
for (const ParticipantManagement::Party &item : qAsConst(m_partyData))
|
||||
for (const ParticipantManagement::Party &item : std::as_const(m_partyData))
|
||||
{
|
||||
if (fi == getRprForceIdentifierFromPpmForceIdentifier(item.hlaForceIdentifier()))
|
||||
return item.id();
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "web_socket_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include "main_handler.h"
|
||||
#include "ngs_handler.h"
|
||||
@@ -24,7 +25,7 @@ WebSocketHandler::WebSocketHandler(int exerciseId, MainHandler *mainHandler, QOb
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{
|
||||
for (const auto &s : qAsConst(m_webSockets))
|
||||
for (const auto &s : std::as_const(m_webSockets))
|
||||
s->disconnect(this);
|
||||
}
|
||||
|
||||
@@ -54,7 +55,7 @@ bool WebSocketHandler::sendTelegramInternal(const TrainingAreaBase::TetraIcd::Tr
|
||||
DEBUG_LOG(m_logger) << "jsonStr: " << jsonStr;
|
||||
|
||||
bool bOk = false;
|
||||
for (auto wsw : qAsConst(m_webSockets))
|
||||
for (auto wsw : std::as_const(m_webSockets))
|
||||
{
|
||||
if (wsw->sendTextMessage(jsonStr, exerciseId))
|
||||
bOk = true;
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ NGL_TARGET_LINK_LIBRARIES(HlaCommon
|
||||
LtsCoordTrans # ParticipantPosition
|
||||
NGLLogger
|
||||
nglsettings
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
svcPpmClient # ParticipantInformation
|
||||
svcPpmCommon
|
||||
ngltools # NGL::findProjectConfigFiles
|
||||
|
||||
+3
-3
@@ -143,9 +143,9 @@ NGL_TARGET_LINK_LIBRARIES(svcHighLevelArchitecture
|
||||
nglcoreapplication
|
||||
NGLLogger
|
||||
nglsettings
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
svcAesClient
|
||||
svcCoreClient
|
||||
svcExmClient
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "aes_handler.h"
|
||||
#include <utility>
|
||||
#include "ngs_handler.h"
|
||||
#include <Common/participantposition.h>
|
||||
|
||||
@@ -320,7 +321,7 @@ void AesHandler::onEffectsChanged(const Effects &data, DataModification modType)
|
||||
|
||||
|
||||
int curSeIndex = -1;
|
||||
for (const AreaEffectSimulation::SingleEffect &se : qAsConst(singleEffectsRef))
|
||||
for (const AreaEffectSimulation::SingleEffect &se : std::as_const(singleEffectsRef))
|
||||
{
|
||||
++curSeIndex;
|
||||
|
||||
|
||||
+4
-3
@@ -3,6 +3,7 @@
|
||||
|
||||
|
||||
#include "ngs_connector.h"
|
||||
#include <utility>
|
||||
#include "ngs_handler.h"
|
||||
#include "ppm_handler.h"
|
||||
#include "damage_model.h"
|
||||
@@ -376,12 +377,12 @@ void NgsConnector::unsubscribeFromNgs()
|
||||
minefieldBreachObjClass.unsubscribe();
|
||||
}
|
||||
|
||||
for (rpr2::IPlayerBaseEntityObjInstance *player : qAsConst(m_playerMap))
|
||||
for (rpr2::IPlayerBaseEntityObjInstance *player : std::as_const(m_playerMap))
|
||||
player->deleteObjectInstance(getSimTime());
|
||||
|
||||
m_playerMap.clear();
|
||||
|
||||
for (rpr2::IPlayerEnvironmentObjectObjInstance *environmentObject : qAsConst(m_environmentObjects))
|
||||
for (rpr2::IPlayerEnvironmentObjectObjInstance *environmentObject : std::as_const(m_environmentObjects))
|
||||
environmentObject->deleteObjectInstance(getSimTime());
|
||||
|
||||
m_environmentObjects.clear();
|
||||
@@ -1654,7 +1655,7 @@ QPolygonF NgsConnector::utmToGeogrphic(const QPolygonF &polyUtm, const LtsCoordT
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ppm_handler.h"
|
||||
#include <utility>
|
||||
#include "ngs_handler.h"
|
||||
#include <Common/participantinformation.h>
|
||||
|
||||
@@ -162,7 +163,7 @@ int PpmHandler::getEquipmentNo(int participantId) const
|
||||
|
||||
int PpmHandler::getParticipantIdByExternalId(int externalId) const
|
||||
{
|
||||
for(const auto &part : qAsConst(m_partData))
|
||||
for(const auto &part : std::as_const(m_partData))
|
||||
{
|
||||
if (part.externalId() == externalId)
|
||||
return part.id();
|
||||
@@ -457,7 +458,7 @@ void PpmHandler::startPublishToNgs()
|
||||
|
||||
INFO_LOG(m_logger) << "(Re)Adding all players, size: " << m_partData.size();
|
||||
|
||||
for (const ParticipantManagement::Participant &participant : qAsConst(m_partData))
|
||||
for (const ParticipantManagement::Participant &participant : std::as_const(m_partData))
|
||||
createParticipant(participant);
|
||||
}
|
||||
|
||||
@@ -649,7 +650,7 @@ ProjectDataManagement::ChargeType PpmHandler::chargeTypeFromDisEntity(const std:
|
||||
m_dtcPdm = nullptr;
|
||||
}
|
||||
|
||||
for (const auto &item : qAsConst(m_chargeTypes))
|
||||
for (const auto &item : std::as_const(m_chargeTypes))
|
||||
{
|
||||
if (item.disEntity() == disEntity)
|
||||
return item;
|
||||
@@ -766,7 +767,7 @@ int PpmHandler::partyIdFromForceIdentifier(rpr2::ForceIdentifierEnum8::ET fi)
|
||||
m_partyData = m_dtcPpm->partys();
|
||||
}
|
||||
|
||||
for (const ParticipantManagement::Party &item : qAsConst(m_partyData))
|
||||
for (const ParticipantManagement::Party &item : std::as_const(m_partyData))
|
||||
{
|
||||
if (fi == getRprForceIdentifierFromPpmForceIdentifier(item.hlaForceIdentifier()))
|
||||
return item.id();
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "web_socket_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include "main_handler.h"
|
||||
#include "ngs_handler.h"
|
||||
@@ -24,7 +25,7 @@ WebSocketHandler::WebSocketHandler(int exerciseId, MainHandler *mainHandler, QOb
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{
|
||||
for (const auto &s : qAsConst(m_webSockets))
|
||||
for (const auto &s : std::as_const(m_webSockets))
|
||||
s->disconnect(this);
|
||||
}
|
||||
|
||||
@@ -54,7 +55,7 @@ bool WebSocketHandler::sendTelegramInternal(const TrainingAreaBase::TetraIcd::Tr
|
||||
DEBUG_LOG(m_logger) << "jsonStr: " << jsonStr;
|
||||
|
||||
bool bOk = false;
|
||||
for (const auto &wsw : qAsConst(m_webSockets))
|
||||
for (const auto &wsw : std::as_const(m_webSockets))
|
||||
{
|
||||
if (wsw->sendTextMessage(jsonStr, exerciseId))
|
||||
bOk = true;
|
||||
|
||||
+4
-4
@@ -101,10 +101,10 @@ NGL_TARGET_LINK_LIBRARIES(hlaTestTool
|
||||
nglcoreapplication
|
||||
NGLLogger
|
||||
nglsettings
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
ngltools
|
||||
# LtsUtilsDds
|
||||
NGS::NGS
|
||||
|
||||
+4
-3
@@ -3,6 +3,7 @@
|
||||
|
||||
|
||||
#include "ngs_connector.h"
|
||||
#include <utility>
|
||||
#include "ngs_handler.h"
|
||||
#include "damage_model.h"
|
||||
#include <Common/settings.h>
|
||||
@@ -372,12 +373,12 @@ void NgsConnector::unsubscribeFromNgs()
|
||||
minefieldBreachObjClass.unsubscribe();
|
||||
}
|
||||
|
||||
for (rpr2::IPlayerBaseEntityObjInstance *player : qAsConst(m_playerMap))
|
||||
for (rpr2::IPlayerBaseEntityObjInstance *player : std::as_const(m_playerMap))
|
||||
player->deleteObjectInstance(getSimTime());
|
||||
|
||||
m_playerMap.clear();
|
||||
|
||||
for (rpr2::IPlayerEnvironmentObjectObjInstance *environmentObject : qAsConst(m_environmentObjects))
|
||||
for (rpr2::IPlayerEnvironmentObjectObjInstance *environmentObject : std::as_const(m_environmentObjects))
|
||||
environmentObject->deleteObjectInstance(getSimTime());
|
||||
|
||||
m_environmentObjects.clear();
|
||||
@@ -1308,7 +1309,7 @@ QPolygonF NgsConnector::utmToGeogrphic(const QPolygonF &polyUtm, const LtsCoordT
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ngs_handler.h"
|
||||
#include <utility>
|
||||
#include "ngs_connector.h"
|
||||
#include "web_socket_interface.h"
|
||||
#include "ws_telegrams.h"
|
||||
@@ -31,7 +32,7 @@ WsInterface::WsInterface(std::shared_ptr<NgsHandler> ngsHandler, QObject *parent
|
||||
WsInterface::~WsInterface()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
for (auto client : qAsConst(m_clients))
|
||||
for (auto client : std::as_const(m_clients))
|
||||
{
|
||||
client->disconnect(this);
|
||||
client->close();
|
||||
|
||||
@@ -25,10 +25,10 @@ if (Qt6_FOUND)
|
||||
set(_QT_SQL_TARGET Qt6::Sql)
|
||||
set(_QT_NETWORK_TARGET Qt6::Network)
|
||||
else()
|
||||
find_package(Qt5 COMPONENTS Core Sql Network QUIET)
|
||||
set(_QT_CORE_TARGET Qt5::Core)
|
||||
set(_QT_SQL_TARGET Qt5::Sql)
|
||||
set(_QT_NETWORK_TARGET Qt5::Network)
|
||||
find_package(Qt6 COMPONENTS Core Sql Network QUIET)
|
||||
set(_QT_CORE_TARGET Qt6::Core)
|
||||
set(_QT_SQL_TARGET Qt6::Sql)
|
||||
set(_QT_NETWORK_TARGET Qt6::Network)
|
||||
endif()
|
||||
|
||||
SET(SRCS_telegrams
|
||||
@@ -92,8 +92,8 @@ NGL_TARGET_LINK_LIBRARIES(svcTabCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Sql
|
||||
Qt6::Core
|
||||
Qt6::Sql
|
||||
ddscore
|
||||
NGLLogger
|
||||
ngldb
|
||||
@@ -230,8 +230,8 @@ CODEGEN_SQL(SRCS_exe ${xml_FILE})
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcTrainingAreaBase ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcTrainingAreaBase
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
LtsCoordTrans
|
||||
LtsWebSocketServer
|
||||
LtsCommandLineParser
|
||||
@@ -268,4 +268,4 @@ TARGET_SOURCES(tabPluginInterface INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/training_area_telegrams.h
|
||||
)
|
||||
TARGET_INCLUDE_DIRECTORIES(tabPluginInterface INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/../)
|
||||
TARGET_LINK_LIBRARIES(tabPluginInterface INTERFACE Qt5::Core svcPdmCommon)
|
||||
TARGET_LINK_LIBRARIES(tabPluginInterface INTERFACE Qt6::Core svcPdmCommon)
|
||||
+7
-7
@@ -7,7 +7,7 @@
|
||||
# Created by Julius Ewert, ESIM, 2024-03-20
|
||||
#
|
||||
|
||||
SET(SRCS_SAA
|
||||
SET(SRCS_SAA
|
||||
telegrams.h
|
||||
telegrams.cpp
|
||||
generatetelegrams.cpp
|
||||
@@ -15,7 +15,7 @@ SET(SRCS_SAA
|
||||
adler_export.h
|
||||
|
||||
)
|
||||
NGL_ADD_LIBRARY(AAR SV WS saaTelegrams SHARED ${SRCS_SAA})
|
||||
NGL_ADD_LIBRARY(WS AAR SV HLA saaTelegrams SHARED ${SRCS_SAA})
|
||||
|
||||
NGL_INSTALL_TARGET(saaTelegrams)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(saaTelegrams
|
||||
@@ -25,8 +25,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(saaTelegrams
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(saaTelegrams
|
||||
svcPdmClient
|
||||
Qt5::Core
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::WebSockets
|
||||
)
|
||||
|
||||
SET(SRCS
|
||||
@@ -72,9 +72,9 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginAdler
|
||||
NGLLogger
|
||||
nglsettings
|
||||
ngltools
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
tabPluginInterface
|
||||
OpmDataPluginInterface
|
||||
tabTelegrams
|
||||
|
||||
+3
-3
@@ -68,9 +68,9 @@ ADD_EXECUTABLE(tabModuleTestAdler ${LinkedSources} ${UnitTestSources}
|
||||
nglsettings
|
||||
nglapplication
|
||||
saaTelegrams
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt5::Test
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
Qt6::Test
|
||||
)
|
||||
|
||||
# ADD_TEST(NAME tabModuleTestAdler COMMAND $<TARGET_FILE:aesUnitTestTneAlgorithmen>)
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
#include "msgcompares.h"
|
||||
#include "../telegrams.h"
|
||||
|
||||
#include <QtTest/QTest>
|
||||
|
||||
|
||||
+18
-17
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "aes_handler.h"
|
||||
#include <utility>
|
||||
#include "DDS/Core/function_reply_object.h"
|
||||
#include "aes.hpp"
|
||||
#include "json_dispatcher.h"
|
||||
@@ -122,7 +123,7 @@ void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &rep
|
||||
|
||||
std::vector<std::string> args;
|
||||
args.reserve(argsList.size());
|
||||
for (const auto &str : qAsConst(argsList))
|
||||
for (const auto &str : std::as_const(argsList))
|
||||
args.emplace_back(str.toStdString());
|
||||
|
||||
req.notification().content(content.toStdString());
|
||||
@@ -165,7 +166,7 @@ void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &rep
|
||||
std::vector<NotificationManagement::Address> recipientIdsDds;
|
||||
recipientIdsDds.reserve(recipientIds.size());
|
||||
|
||||
for (const auto &recipientId : qAsConst(recipientIds))
|
||||
for (const auto &recipientId : std::as_const(recipientIds))
|
||||
{
|
||||
NotificationManagement::Address addr;
|
||||
addr.addressId(recipientId);
|
||||
@@ -336,7 +337,7 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
|
||||
QVector<int> subordinates = m_dtcPpm->getSubordinatesByParticipant(participantId);
|
||||
QVector<ParticipantManagement::ParticipantPosition> subordinatePositions;
|
||||
|
||||
for (int subordinate : qAsConst(subordinates))
|
||||
for (int subordinate : std::as_const(subordinates))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "subordinates(" << participantId << ") :" << subordinate;
|
||||
subordinatePositions.append(m_dtcPpm->participantPosition(subordinate));
|
||||
@@ -352,7 +353,7 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
|
||||
|
||||
double grad = (data.zieldaten.zielachse / 6400.) * 360.0;
|
||||
|
||||
for (Flugbahnpunkt pos : qAsConst(data.feuerkommando.wirkmittel.at(wirkmittelIndex).flugbahnpunkt))
|
||||
for (Flugbahnpunkt pos : std::as_const(data.feuerkommando.wirkmittel.at(wirkmittelIndex).flugbahnpunkt))
|
||||
{
|
||||
|
||||
|
||||
@@ -597,7 +598,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
QList<QRectF> rects;
|
||||
int zone = 0;
|
||||
QVector<QPointF> vecPoints;
|
||||
for (const WirkmittelFeuerkommando &effector : qAsConst(data.feuerkommando.wirkmittel))
|
||||
for (const WirkmittelFeuerkommando &effector : std::as_const(data.feuerkommando.wirkmittel))
|
||||
{
|
||||
|
||||
const QPointF centerPoint(effector.auftreffpunkt.koordinate.longitude * (M_PI / 180.0), effector.auftreffpunkt.koordinate.latitude * (M_PI / 180.0));
|
||||
@@ -646,9 +647,9 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
|
||||
int zone = 0;
|
||||
QVector<QPointF> vecPoints;
|
||||
for (const WirkmittelFeuerkommandoRakete &effector : qAsConst(data.feuerkommando.wirkmittelRakete))
|
||||
for (const WirkmittelFeuerkommandoRakete &effector : std::as_const(data.feuerkommando.wirkmittelRakete))
|
||||
{
|
||||
for (const Treffpunkt &treffpunkt : qAsConst(effector.treffpunkte))
|
||||
for (const Treffpunkt &treffpunkt : std::as_const(effector.treffpunkte))
|
||||
{
|
||||
const QPointF centerPoint(treffpunkt.koordinate.koordinate.longitude * (M_PI / 180.0), treffpunkt.koordinate.koordinate.latitude * (M_PI / 180.0));
|
||||
|
||||
@@ -716,7 +717,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
|
||||
if (data.feuerkommando.wirkmittel.size() > 0)
|
||||
{
|
||||
for (const auto &effectorAdler : qAsConst(data.feuerkommando.wirkmittel))
|
||||
for (const auto &effectorAdler : std::as_const(data.feuerkommando.wirkmittel))
|
||||
{
|
||||
AreaEffectSimulation::EffectorData effectorData;
|
||||
effectorData.angleOfFall() = 0;
|
||||
@@ -750,7 +751,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
const double useNewGrad = -90 + std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
|
||||
DEBUG_LOG(m_logger) << "Atan2 Deg to: last point " << std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
|
||||
|
||||
for (const auto &flightPointAdler : qAsConst(effectorAdler.flugbahnpunkt))
|
||||
for (const auto &flightPointAdler : std::as_const(effectorAdler.flugbahnpunkt))
|
||||
{
|
||||
Core::RelativePositionRelativeTime flightPoint;
|
||||
flightPoint.offsetX() = 0;
|
||||
@@ -798,7 +799,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
}
|
||||
else if (data.feuerkommando.wirkmittelRakete.size() > 0)
|
||||
{
|
||||
for (const auto &effectorAdler : qAsConst(data.feuerkommando.wirkmittelRakete))
|
||||
for (const auto &effectorAdler : std::as_const(data.feuerkommando.wirkmittelRakete))
|
||||
{
|
||||
AreaEffectSimulation::EffectorData effectorData;
|
||||
|
||||
@@ -823,7 +824,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
|
||||
Core::GeoPosition mhpPos;
|
||||
QPointF centroid;
|
||||
for (const auto &treffpunkt : qAsConst(effectorAdler.treffpunkte))
|
||||
for (const auto &treffpunkt : std::as_const(effectorAdler.treffpunkte))
|
||||
centroid += {treffpunkt.koordinate.koordinate.latitude, treffpunkt.koordinate.koordinate.longitude};
|
||||
|
||||
centroid /= effectorAdler.treffpunkte.size();
|
||||
@@ -861,7 +862,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
double currentFlightTime = 0.0;
|
||||
|
||||
const LtsCoordTrans::UtmCoordinate utmStartPos = LtsCoordTrans::UtmCoordinate::fromGeographic(participantPosition.pos().lon(), participantPosition.pos().lat());
|
||||
for (const Core::GeoPosition &pos : qAsConst(trajectoryWithoutTime))
|
||||
for (const Core::GeoPosition &pos : std::as_const(trajectoryWithoutTime))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate utmCurrentPos = LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon(), pos.lat());
|
||||
|
||||
@@ -907,7 +908,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
std::vector<ProjectDataManagement::L27_EffectorId> refWirkmittel;
|
||||
refWirkmittel.reserve(data.feuerkommando.wirkmittel.size());
|
||||
|
||||
for (const auto &wm : qAsConst(data.feuerkommando.wirkmittel))
|
||||
for (const auto &wm : std::as_const(data.feuerkommando.wirkmittel))
|
||||
{
|
||||
ammoCounter += wm.geschoss.anzahl;
|
||||
DEBUG_LOG(m_logger) << "INSERT KENNER INTO MAP: " << data.feuerkampfReferenz << "---------" << wm.kenner;
|
||||
@@ -926,7 +927,7 @@ QList<qint32> AesHandler::findAllPendingEffectCluster(int partyId)
|
||||
|
||||
QList<qint32> ret;
|
||||
const auto &effectClusters = m_dtcAes->effectClusters();
|
||||
for (const auto &effectCluster : qAsConst(effectClusters))
|
||||
for (const auto &effectCluster : std::as_const(effectClusters))
|
||||
{
|
||||
if (effectCluster.partyId() != partyId)
|
||||
continue;
|
||||
@@ -953,7 +954,7 @@ void AesHandler::handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bo
|
||||
|
||||
const auto &aesEffetClusters = m_dtcAes->effectClusters();
|
||||
|
||||
for (const auto &aes : qAsConst(aesEffetClusters))
|
||||
for (const auto &aes : std::as_const(aesEffetClusters))
|
||||
{
|
||||
if (aes.isDeleted() || aes.partyId() != saaPartyId || aes.element() != refTrimmed.toStdString())
|
||||
{
|
||||
@@ -984,7 +985,7 @@ void AesHandler::handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bo
|
||||
{
|
||||
auto refKenners = m_feuerkampfReferenzWirkmittel.value(refTrimmed);
|
||||
|
||||
for (const auto &kenner : qAsConst(refKenners))
|
||||
for (const auto &kenner : std::as_const(refKenners))
|
||||
{
|
||||
ExVollzugsmeldung exvm;
|
||||
exvm.feuerkampfdaten.feuerkampfReferenz = data.feuerkampfReferenz;
|
||||
@@ -1016,7 +1017,7 @@ void AesHandler::removeAllPendingEffectCluster(int partyId)
|
||||
|
||||
INFO_LOG(m_logger) << "Pending effect cluster size: " << effectClusterIds.size();
|
||||
Core::RemoveElementRequest req;
|
||||
for (const qint32 id : qAsConst(effectClusterIds))
|
||||
for (const qint32 id : std::as_const(effectClusterIds))
|
||||
{
|
||||
req.id(id);
|
||||
INFO_LOG(m_logger) << "Remove effect cluster id: " << id;
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "flm_handler.h"
|
||||
#include <utility>
|
||||
#include "FileManagement/flm_operator_rights.h"
|
||||
#include "main_dispatcher.h"
|
||||
#include "nglsettings/nglsettings_settings.h"
|
||||
@@ -103,7 +104,7 @@ bool FlmHandler::processHQMessage(int partyId, const QString &name, int meldungs
|
||||
}
|
||||
|
||||
int maxNumber = 0;
|
||||
for (const QString &fileName : qAsConst(fileNames))
|
||||
for (const QString &fileName : std::as_const(fileNames))
|
||||
{
|
||||
QString normalizedName = fileName.normalized(QString::NormalizationForm_C);
|
||||
DEBUG_LOG(m_logger) << "normalized fileName: " << normalizedName << "|";
|
||||
|
||||
+8
-7
@@ -1,4 +1,5 @@
|
||||
#include "generatetelegrams.h"
|
||||
#include <QRandomGenerator>
|
||||
|
||||
GenerateTelegrams::GenerateTelegrams() {}
|
||||
|
||||
@@ -86,7 +87,7 @@ void GenerateTelegrams::generateEXFQBABBFK(AdlerJson::ExAwesPlanning &req)
|
||||
|
||||
AdlerJson::WirkfeldplanungData wfp;
|
||||
|
||||
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(qrand());
|
||||
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(QRandomGenerator::global()->bounded(1000000));
|
||||
|
||||
generateZieldaten(wfp.zieldaten);
|
||||
|
||||
@@ -188,7 +189,7 @@ void GenerateTelegrams::generateEXFQBABBFK_Gmlrs(AdlerJson::ExAwesPlanning &req)
|
||||
|
||||
AdlerJson::WirkfeldplanungData wfp;
|
||||
|
||||
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(qrand());
|
||||
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(QRandomGenerator::global()->bounded(1000000));
|
||||
wfp.zieldaten.nummer = 143;
|
||||
wfp.abfeuerungsArt = AdlerJson::Abfeuerungsart::F;
|
||||
wfp.dauer = 0;
|
||||
@@ -264,7 +265,7 @@ void GenerateTelegrams::generateEXFQBABBFK_Dm72(AdlerJson::ExAwesPlanning &req)
|
||||
|
||||
AdlerJson::WirkfeldplanungData wfp;
|
||||
|
||||
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(qrand());
|
||||
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(QRandomGenerator::global()->bounded(1000000));
|
||||
wfp.zieldaten.nummer = 143;
|
||||
wfp.abfeuerungsArt = AdlerJson::Abfeuerungsart::B;
|
||||
wfp.dauer = 0;
|
||||
@@ -420,8 +421,8 @@ void GenerateTelegrams::generateFeuerkampf(AdlerJson::ExFeuerkampf &req)
|
||||
AdlerJson::FeuerkommandoGeschosse geschoss;
|
||||
geschoss.geschosssorte = QStringLiteral("Spreng DM121");
|
||||
geschoss.ladung = QStringLiteral("M DM72");
|
||||
geschoss.zuender = 4;
|
||||
geschoss.zuenderFunktion = 2;
|
||||
geschoss.zuender = QString::number(4);
|
||||
geschoss.zuenderFunktion = QString::number(2);
|
||||
geschoss.zuenderZeit = 0;
|
||||
geschoss.anzahl = 1;
|
||||
geschoss.intervall = 1.0;
|
||||
@@ -507,12 +508,12 @@ void GenerateTelegrams::generateStellungsmeldungFS(AdlerJson::ExFeuerstellungFS
|
||||
AdlerJson::Geschoss geschoss2;
|
||||
geschoss1.geschosssorte = QStringLiteral("Mine DM72");
|
||||
geschoss1.ladung = QStringLiteral("M DM72");
|
||||
geschoss1.zuender = 11;
|
||||
geschoss1.zuender = QString::number(11);
|
||||
geschoss1.anzahl = 6;
|
||||
|
||||
geschoss2.geschosssorte = QStringLiteral("Leucht DM116");
|
||||
geschoss2.ladung = QStringLiteral("B L8A1");
|
||||
geschoss2.zuender = 3;
|
||||
geschoss2.zuender = QString::number(3);
|
||||
geschoss2.anzahl = 7;
|
||||
req.feuerstellungsdaten.geschosse.append(geschoss1);
|
||||
req.feuerstellungsdaten.geschosse.append(geschoss2);
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "json_dispatcher.h"
|
||||
#include <utility>
|
||||
#include "json_handler_rx.h"
|
||||
#include "json_handler_tx.h"
|
||||
#include "settings.h"
|
||||
@@ -904,7 +905,7 @@ void JsonDispatcher::getCreateNotificationRequestData(const int wsId,
|
||||
|
||||
std::vector<std::string> args;
|
||||
args.reserve(contentArgs.size());
|
||||
for (const auto & str : qAsConst(contentArgs))
|
||||
for (const auto & str : std::as_const(contentArgs))
|
||||
args.emplace_back(str.toStdString());
|
||||
|
||||
notif.content(content.toStdString());
|
||||
@@ -924,7 +925,7 @@ void JsonDispatcher::getCreateNotificationRequestData(const int wsId,
|
||||
std::vector<NotificationManagement::Address> recipientIdsDds;
|
||||
recipientIdsDds.reserve(recipientIds.size());
|
||||
|
||||
for (const auto &recipientId : qAsConst(recipientIds))
|
||||
for (const auto &recipientId : std::as_const(recipientIds))
|
||||
{
|
||||
NotificationManagement::Address addr;
|
||||
addr.addressId(recipientId);
|
||||
|
||||
+6
-5
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ppm_handler.h"
|
||||
#include <utility>
|
||||
#include "Core/core.hpp"
|
||||
|
||||
#include <QJsonDocument>
|
||||
@@ -457,7 +458,7 @@ void PpmHandler::removeAllSAAParticipants(const int partyId)
|
||||
return;
|
||||
ParticipantManagement::ModifyParticipantDataRequest req;
|
||||
std::vector<ParticipantManagement::ParticipantData> list;
|
||||
for (const auto &part : qAsConst(participants))
|
||||
for (const auto &part : std::as_const(participants))
|
||||
{
|
||||
const ParticipantManagement::Type &participantType = m_dtcPpm->type(part.typeId());
|
||||
bool isUnitType
|
||||
@@ -715,7 +716,7 @@ void PpmHandler::handleParticipantPositionChangedInternal(const ParticipantManag
|
||||
{
|
||||
const QVector<int32_t> mountedParticipantIds(position.mountedParticipants().get().begin(), position.mountedParticipants().get().end());
|
||||
|
||||
for (int mountedParticipantId : qAsConst(mountedParticipantIds))
|
||||
for (int mountedParticipantId : std::as_const(mountedParticipantIds))
|
||||
{
|
||||
ParticipantManagement::Participant mountedParticipant = m_dtcPpm->participant(mountedParticipantId);
|
||||
const bool isExternal = mountedParticipant.externalId() > 0;
|
||||
@@ -851,7 +852,7 @@ QList<ParticipantManagement::Participant> PpmHandler::findAllSAAParticipants(con
|
||||
{
|
||||
QList<ParticipantManagement::Participant> ret;
|
||||
const auto &list = m_dtcPpm->participants();
|
||||
for (const auto &part : qAsConst(list))
|
||||
for (const auto &part : std::as_const(list))
|
||||
{
|
||||
if (part.partyId() != partyId || part.isDeleted())
|
||||
continue;
|
||||
@@ -889,7 +890,7 @@ ParticipantManagement::ParticipantData PpmHandler::findRootUnit(const int partyI
|
||||
{
|
||||
ParticipantManagement::ParticipantData ret;
|
||||
const auto &list = m_dtcPpm->participants();
|
||||
for (const auto &part : qAsConst(list))
|
||||
for (const auto &part : std::as_const(list))
|
||||
{
|
||||
if (part.partyId() != partyId || part.isDeleted())
|
||||
continue;
|
||||
@@ -910,7 +911,7 @@ ParticipantManagement::Participant PpmHandler::findParticipantByInternalName(con
|
||||
ParticipantManagement::Participant pp;
|
||||
DEBUG_LOG(m_logger) << "START find participant: " << internalName;
|
||||
auto participantMap = m_dtcPpm->participants();
|
||||
for (const auto &part : qAsConst(participantMap))
|
||||
for (const auto &part : std::as_const(participantMap))
|
||||
{
|
||||
if (part.partyId() != partyId || part.isDeleted())
|
||||
continue;
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
#include "saa_interface.h"
|
||||
#include <utility>
|
||||
#include "qpoint.h"
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <TrainingAreaBase/Plugins/AdlerJson/telegrams.h>
|
||||
@@ -158,7 +159,7 @@ void SAAInterface::parseFlugbahndaten(const Flugbahndaten &flugbahndaten, int ae
|
||||
matrix.rotate(useNewGrad);
|
||||
|
||||
|
||||
for (Flugbahnpunkt pos : qAsConst(flugbahndaten.flugbahnpunkt))
|
||||
for (Flugbahnpunkt pos : std::as_const(flugbahndaten.flugbahnpunkt))
|
||||
{
|
||||
|
||||
|
||||
|
||||
+30
-29
@@ -1,4 +1,5 @@
|
||||
#include "telegrams.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
@@ -332,7 +333,7 @@ void SAATELEGRAMS_EXPORT zielmeldedatenFromJson(const QJsonObject &data, Zielmel
|
||||
zielmeldedaten.forderung = ForderungMap.value(data[JsonKeys::FORDERUNG()].toString());
|
||||
zielmeldedaten.dauer = toInteger(data[JsonKeys::DAUER()], bOk);
|
||||
QJsonArray FeuerkommandoArray = data[JsonKeys::FEUERKOMMANDO()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(FeuerkommandoArray))
|
||||
for (const QJsonValue &value : std::as_const(FeuerkommandoArray))
|
||||
{
|
||||
Feuerkommando feuerkommando;
|
||||
feuerkommandoFromJson(value.toObject(), feuerkommando, bOk);
|
||||
@@ -362,7 +363,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenFromJson(const QJsonObject &data, Fe
|
||||
einheitfromJson(data[JsonKeys::FEUEREINHEIT()].toObject(), feuerstellungsdaten.feuereinheit, bOk);
|
||||
koordinateMitHoeheFromJson(data[JsonKeys::MITTELPUNKT()].toObject(), feuerstellungsdaten.mittelpunkt, bOk);
|
||||
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(koordinatenArray))
|
||||
for (const QJsonValue &value : std::as_const(koordinatenArray))
|
||||
{
|
||||
KoordinateMitHoehe koordinate;
|
||||
koordinateMitHoeheFromJson(value.toObject(), koordinate, bOk);
|
||||
@@ -370,7 +371,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenFromJson(const QJsonObject &data, Fe
|
||||
}
|
||||
|
||||
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(geschosseArray))
|
||||
for (const QJsonValue &value : std::as_const(geschosseArray))
|
||||
{
|
||||
Geschoss geschosse;
|
||||
geschossfromJson(value.toObject(), geschosse, bOk);
|
||||
@@ -394,7 +395,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenToJson(QJsonObject &data, const Feue
|
||||
data[JsonKeys::MITTELPUNKT()] = mittelpunkt;
|
||||
|
||||
QJsonArray koordinaten;
|
||||
for (const auto &koordinate : qAsConst(feuerstellungsdaten.koordinaten))
|
||||
for (const auto &koordinate : std::as_const(feuerstellungsdaten.koordinaten))
|
||||
{
|
||||
QJsonObject koordinateObj;
|
||||
koordinateMitHoeheToJson(koordinateObj, koordinate);
|
||||
@@ -403,7 +404,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenToJson(QJsonObject &data, const Feue
|
||||
data[JsonKeys::KOORDINATEN()] = koordinaten;
|
||||
|
||||
QJsonArray geschosse;
|
||||
for (const auto &geschoss : qAsConst(feuerstellungsdaten.geschosse))
|
||||
for (const auto &geschoss : std::as_const(feuerstellungsdaten.geschosse))
|
||||
{
|
||||
QJsonObject geschossObj;
|
||||
geschossToJson(geschossObj, geschoss);
|
||||
@@ -425,7 +426,7 @@ void SAATELEGRAMS_EXPORT waffensystemdatenFromJson(const QJsonObject &data, Waff
|
||||
einheitfromJson(data[JsonKeys::EINHEIT()].toObject(), waffensystemdaten.einheit, bOk);
|
||||
|
||||
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(geschosseArray))
|
||||
for (const QJsonValue &value : std::as_const(geschosseArray))
|
||||
{
|
||||
Geschoss geschosse;
|
||||
geschossfromJson(value.toObject(), geschosse, bOk);
|
||||
@@ -445,7 +446,7 @@ void SAATELEGRAMS_EXPORT waffensystemdatenToJson(QJsonObject &data, const Waffen
|
||||
data[JsonKeys::EINHEIT()] = einheit;
|
||||
|
||||
QJsonArray geschosse;
|
||||
for (const auto &geschoss : qAsConst(waffensystemdaten.geschosse))
|
||||
for (const auto &geschoss : std::as_const(waffensystemdaten.geschosse))
|
||||
{
|
||||
QJsonObject geschossObj;
|
||||
geschossToJson(geschossObj, geschoss);
|
||||
@@ -469,7 +470,7 @@ void SAATELEGRAMS_EXPORT ladeplatzdatenFromJson(const QJsonObject &data, Ladepla
|
||||
|
||||
koordinateMitHoeheFromJson(data[JsonKeys::KOORDINATE()].toObject(), ladeplatzdaten.koordinate, bOk);
|
||||
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(geschosseArray))
|
||||
for (const QJsonValue &value : std::as_const(geschosseArray))
|
||||
{
|
||||
Geschoss geschosse;
|
||||
geschossfromJson(value.toObject(), geschosse, bOk);
|
||||
@@ -484,7 +485,7 @@ void SAATELEGRAMS_EXPORT ladeplatzdatenToJson(QJsonObject &data, const Ladeplatz
|
||||
data[JsonKeys::EINHEIT()] = einheit;
|
||||
|
||||
QJsonArray geschosse;
|
||||
for (const auto &geschoss : qAsConst(ladeplatzdaten.geschosse))
|
||||
for (const auto &geschoss : std::as_const(ladeplatzdaten.geschosse))
|
||||
{
|
||||
QJsonObject geschossObj;
|
||||
geschossToJson(geschossObj, geschoss);
|
||||
@@ -536,7 +537,7 @@ void SAATELEGRAMS_EXPORT koordinierungsdatenFromJson(const QJsonObject &data, Ko
|
||||
zeitangabe_DTGFromJson(data[JsonKeys::BIS()].toObject(), koordinierungsdaten.bis, bOk);
|
||||
|
||||
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(koordinatenArray))
|
||||
for (const QJsonValue &value : std::as_const(koordinatenArray))
|
||||
{
|
||||
Koordinate koordinate;
|
||||
koordinatefromJson(value.toObject(), koordinate, bOk);
|
||||
@@ -561,7 +562,7 @@ void SAATELEGRAMS_EXPORT koordinierungsdatenToJson(QJsonObject &data, const Koor
|
||||
data[JsonKeys::BIS()] = objTimestamp;
|
||||
|
||||
QJsonArray koordinatenArray;
|
||||
for (const auto &koordinate : qAsConst(koordinierungsdaten.koordinaten))
|
||||
for (const auto &koordinate : std::as_const(koordinierungsdaten.koordinaten))
|
||||
{
|
||||
QJsonObject objKoordinate;
|
||||
koordinateToJson(objKoordinate, koordinate);
|
||||
@@ -817,7 +818,7 @@ void SAATELEGRAMS_EXPORT erkundungsstellungenFromJson(const QJsonObject &data, E
|
||||
|
||||
|
||||
QJsonArray waffenplaetzeArray = data[JsonKeys::WAFFENPLAETZE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(waffenplaetzeArray))
|
||||
for (const QJsonValue &value : std::as_const(waffenplaetzeArray))
|
||||
{
|
||||
KoordinateMitHoehe koordinateMitHoehe;
|
||||
koordinateMitHoeheFromJson(value.toObject(), koordinateMitHoehe, bOk);
|
||||
@@ -829,7 +830,7 @@ void SAATELEGRAMS_EXPORT erkundungsstellungenFromJson(const QJsonObject &data, E
|
||||
void SAATELEGRAMS_EXPORT erkundungsstellungenToJson(QJsonObject &data, const Erkundungsstellungen &erkundungsstellungen)
|
||||
{
|
||||
QJsonArray objWaffenplatzList;
|
||||
for (const auto waffenplatz : qAsConst(erkundungsstellungen.waffenplaetze))
|
||||
for (const auto waffenplatz : std::as_const(erkundungsstellungen.waffenplaetze))
|
||||
{
|
||||
QJsonObject objWaffenplatz;
|
||||
koordinateMitHoeheToJson(objWaffenplatz, waffenplatz);
|
||||
@@ -855,7 +856,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
|
||||
else
|
||||
{
|
||||
QJsonArray wirkmittelArray = data[JsonKeys::WIRKMITTEL()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(wirkmittelArray))
|
||||
for (const QJsonValue &value : std::as_const(wirkmittelArray))
|
||||
{
|
||||
WirkmittelFeuerkommando wirkmittel;
|
||||
wirkmittelFeuerkommandoFromJson(value.toObject(), wirkmittel, bOk);
|
||||
@@ -867,7 +868,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
|
||||
else
|
||||
{
|
||||
QJsonArray wirkmittelArray = data[JsonKeys::WIRKMITTELRAKETE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(wirkmittelArray))
|
||||
for (const QJsonValue &value : std::as_const(wirkmittelArray))
|
||||
{
|
||||
WirkmittelFeuerkommandoRakete wirkmittel;
|
||||
wirkmittelFeuerkommandoRaketeFromJson(value.toObject(), wirkmittel, bOk);
|
||||
@@ -878,7 +879,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
|
||||
|
||||
void SAATELEGRAMS_EXPORT feuerkommandosToJson(QJsonArray &data, const QVector<Feuerkommando> &feuerkommandos)
|
||||
{
|
||||
for (const auto &feuerkommando : qAsConst(feuerkommandos))
|
||||
for (const auto &feuerkommando : std::as_const(feuerkommandos))
|
||||
{
|
||||
QJsonObject objFeuerkommand;
|
||||
feuerkommandoToJson(objFeuerkommand, feuerkommando);
|
||||
@@ -892,7 +893,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoToJson(QJsonObject &data, const Feuerkomma
|
||||
data[JsonKeys::TYP()] = waffensystemtypMap.key(feuerkommando.typ);
|
||||
QJsonArray objWirkmittelList;
|
||||
QJsonArray objWirkmittelRaketeList;
|
||||
for (const auto &kommando : qAsConst(feuerkommando.wirkmittel))
|
||||
for (const auto &kommando : std::as_const(feuerkommando.wirkmittel))
|
||||
{
|
||||
QJsonObject objWirkmittel;
|
||||
wirkmittelFeuerkommandoToJson(objWirkmittel, kommando);
|
||||
@@ -900,7 +901,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoToJson(QJsonObject &data, const Feuerkomma
|
||||
}
|
||||
data[JsonKeys::WIRKMITTEL()] = objWirkmittelList;
|
||||
|
||||
for (const auto &kommando : qAsConst(feuerkommando.wirkmittelRakete))
|
||||
for (const auto &kommando : std::as_const(feuerkommando.wirkmittelRakete))
|
||||
{
|
||||
QJsonObject objWirkmittel;
|
||||
wirkmittelFeuerkommandoRaketeToJson(objWirkmittel, kommando);
|
||||
@@ -937,7 +938,7 @@ void wirkmittelFeuerkommandoFromJson(const QJsonObject &data, WirkmittelFeuerkom
|
||||
|
||||
void wirkmittelFeuerkommandosToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommando> &wirkmittelFeuerkommando)
|
||||
{
|
||||
for (const auto &feuerkommando : qAsConst(wirkmittelFeuerkommando))
|
||||
for (const auto &feuerkommando : std::as_const(wirkmittelFeuerkommando))
|
||||
{
|
||||
QJsonObject fkd;
|
||||
wirkmittelFeuerkommandoToJson(fkd, feuerkommando);
|
||||
@@ -947,7 +948,7 @@ void wirkmittelFeuerkommandosToJson(QJsonArray &data, const QVector<WirkmittelFe
|
||||
|
||||
void wirkmittelFeuerkommansdoToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommando> &wirkmittelFeuerkommando)
|
||||
{
|
||||
for (const auto &wfk : qAsConst(wirkmittelFeuerkommando))
|
||||
for (const auto &wfk : std::as_const(wirkmittelFeuerkommando))
|
||||
{
|
||||
QJsonObject obj;
|
||||
wirkmittelFeuerkommandoToJson(obj, wfk);
|
||||
@@ -1007,7 +1008,7 @@ void SAATELEGRAMS_EXPORT flugbahnpunktToJson(QJsonObject &data, const Flugbahnpu
|
||||
|
||||
void SAATELEGRAMS_EXPORT flugbahnpunkteFromJson(const QJsonArray &data, QVector<Flugbahnpunkt> &flugbahnpunkte, bool &bOk)
|
||||
{
|
||||
for (const QJsonValue &value : qAsConst(data))
|
||||
for (const QJsonValue &value : std::as_const(data))
|
||||
{
|
||||
QJsonObject obj = value.toObject();
|
||||
Flugbahnpunkt flugbahnpunkt;
|
||||
@@ -1021,7 +1022,7 @@ void SAATELEGRAMS_EXPORT flugbahnpunkteToJson(QJsonArray &data, const QVector<Fl
|
||||
if (flugbahnpunkte.isEmpty())
|
||||
return;
|
||||
|
||||
for (const auto &flugpunkt : qAsConst(flugbahnpunkte))
|
||||
for (const auto &flugpunkt : std::as_const(flugbahnpunkte))
|
||||
{
|
||||
QJsonObject objFlugpunkt;
|
||||
flugbahnpunktToJson(objFlugpunkt, flugpunkt);
|
||||
@@ -1168,7 +1169,7 @@ void treffpunktfromJson(const QJsonObject &data, Treffpunkt &treffpunkt, bool &b
|
||||
|
||||
void treffpunktefromJson(const QJsonArray &data, QVector<Treffpunkt> &treffpunkte, bool &bOk)
|
||||
{
|
||||
for (const QJsonValue &val : qAsConst(data))
|
||||
for (const QJsonValue &val : std::as_const(data))
|
||||
{
|
||||
Treffpunkt treffpunkt;
|
||||
treffpunktfromJson(val.toObject(), treffpunkt, bOk);
|
||||
@@ -1215,7 +1216,7 @@ void trefferpunktToJson(QJsonObject &data, const Treffpunkt &treffpunkt)
|
||||
|
||||
void trefferpunkteToJson(QJsonArray &data, const QVector<Treffpunkt> &treffpunkte)
|
||||
{
|
||||
for (const auto &treffpunkt : qAsConst(treffpunkte))
|
||||
for (const auto &treffpunkt : std::as_const(treffpunkte))
|
||||
{
|
||||
QJsonObject trp;
|
||||
trefferpunktToJson(trp, treffpunkt);
|
||||
@@ -1244,7 +1245,7 @@ void wirkmittelFeuerkommandoRaketeToJson(QJsonObject &data, const WirkmittelFeue
|
||||
|
||||
void wirkmittelFeuerkommandosRaketeToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommandoRakete> &wirkmittelFeuerkommandoRakete)
|
||||
{
|
||||
for (const auto &feuerkommandoRakete : qAsConst(wirkmittelFeuerkommandoRakete))
|
||||
for (const auto &feuerkommandoRakete : std::as_const(wirkmittelFeuerkommandoRakete))
|
||||
{
|
||||
QJsonObject fkr;
|
||||
wirkmittelFeuerkommandoRaketeToJson(fkr, feuerkommandoRakete);
|
||||
@@ -1292,7 +1293,7 @@ void SAATELEGRAMS_EXPORT fuehrungsdatenFromJson(const QJsonObject &data, Fuehrun
|
||||
zeitangabe_DTGFromJson(data[JsonKeys::AB()].toObject(), fuehrungsdaten.ab, bOk);
|
||||
zeitangabe_DTGFromJson(data[JsonKeys::BIS()].toObject(), fuehrungsdaten.bis, bOk);
|
||||
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(koordinatenArray))
|
||||
for (const QJsonValue &value : std::as_const(koordinatenArray))
|
||||
{
|
||||
Koordinate koordinate;
|
||||
koordinatefromJson(value.toObject(), koordinate, bOk);
|
||||
@@ -1315,7 +1316,7 @@ void SAATELEGRAMS_EXPORT fuehrungsdatenToJson(QJsonObject &data, const Fuehrungs
|
||||
data[JsonKeys::BIS()] = objTimestamp;
|
||||
|
||||
QJsonArray koordinatenArray;
|
||||
for (const auto &koordinate : qAsConst(fuehrungsdaten.koordinaten))
|
||||
for (const auto &koordinate : std::as_const(fuehrungsdaten.koordinaten))
|
||||
{
|
||||
QJsonObject objKoordinate;
|
||||
koordinateToJson(objKoordinate, koordinate);
|
||||
@@ -1378,7 +1379,7 @@ void SAATELEGRAMS_EXPORT flugbahndatenFromJson(const QJsonObject &data, Flugbahn
|
||||
flugbahndaten.fallwinkel = toInteger(data[JsonKeys::FALLWINKEL()], bOk);
|
||||
|
||||
QJsonArray flugbahnpunkteArray = data[JsonKeys::FLUGBAHNPUNKT()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(flugbahnpunkteArray))
|
||||
for (const QJsonValue &value : std::as_const(flugbahnpunkteArray))
|
||||
{
|
||||
Flugbahnpunkt flugbahnpunkt;
|
||||
flugbahnpunktFromJson(value.toObject(), flugbahnpunkt, bOk);
|
||||
@@ -1410,7 +1411,7 @@ void SAATELEGRAMS_EXPORT flugbahndatenToJson(QJsonObject &data, const Flugbahnda
|
||||
data[JsonKeys::FALLWINKEL()] = flugbahndaten.fallwinkel;
|
||||
|
||||
QJsonArray flugbahnpunkte;
|
||||
for (const auto &flugbahnpunkt : qAsConst(flugbahndaten.flugbahnpunkt))
|
||||
for (const auto &flugbahnpunkt : std::as_const(flugbahndaten.flugbahnpunkt))
|
||||
{
|
||||
QJsonObject flugbahnpunktObj;
|
||||
flugbahnpunktToJson(flugbahnpunktObj, flugbahnpunkt);
|
||||
|
||||
+3
-3
@@ -37,9 +37,9 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginApHla
|
||||
NGLLogger
|
||||
nglsettings
|
||||
ngltools
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
tabPluginInterface
|
||||
tabTelegrams
|
||||
svcTabCommon
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginDebugJsonDir
|
||||
tabTelegrams
|
||||
NGLLogger
|
||||
nglsettings
|
||||
Qt5::Core
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::WebSockets
|
||||
tabPluginInterface
|
||||
xdr_qthandler_dir
|
||||
)
|
||||
+1
-1
@@ -26,6 +26,6 @@ NGL_TARGET_LINK_LIBRARIES(xdr_qthandler_dir
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
NGL_INSTALL_TARGET(xdr_qthandler_dir)
|
||||
+3
-3
@@ -27,9 +27,9 @@ NGL_INSTALL_TARGET(tabPluginHla)
|
||||
NGL_TARGET_LINK_LIBRARIES(tabPluginHla
|
||||
NGLLogger
|
||||
nglsettings
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
tabPluginInterface
|
||||
tabTelegrams
|
||||
)
|
||||
+4
-4
@@ -30,10 +30,10 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginNmea
|
||||
NGLLogger
|
||||
nglsettings
|
||||
PrtCnvLib
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::Sql
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::Sql
|
||||
Qt6::WebSockets
|
||||
tabPluginInterface
|
||||
tabTelegrams
|
||||
)
|
||||
+4
-4
@@ -26,10 +26,10 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginTetraJson
|
||||
CoPrtCnv
|
||||
NGLLogger
|
||||
nglsettings
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::Sql
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::Sql
|
||||
Qt6::WebSockets
|
||||
tabPluginInterface
|
||||
tabTelegrams
|
||||
PrtCnvLib
|
||||
|
||||
+3
-3
@@ -29,9 +29,9 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginUAS
|
||||
|
||||
NGLLogger
|
||||
nglsettings
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Network
|
||||
tabTelegrams
|
||||
tabPluginInterface
|
||||
svcCesClient
|
||||
|
||||
+2
-2
@@ -66,8 +66,8 @@ PRIVATE
|
||||
add_executable(TabUASTest6 test6.cpp)
|
||||
target_link_libraries(TabUASTest6
|
||||
PRIVATE
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
|
||||
#TmsIfAdapter via dlopen !
|
||||
TmsIfAdapterInterface
|
||||
|
||||
+4
-4
@@ -55,10 +55,10 @@ PRIVATE
|
||||
LtsCoordTrans
|
||||
NGLLogger
|
||||
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
)
|
||||
|
||||
target_compile_definitions(TmsIfAdapter PUBLIC DDS_VENDOR_CYCLONE)
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "report_mission_status.h"
|
||||
#include <utility>
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +65,7 @@ void Dispatcher::ReportMissionStatus(M_MissionCtrl::MissionStatusType const& Mis
|
||||
|
||||
std::vector<Task> currentlyAllowedTasks;
|
||||
|
||||
for (const auto &tmsIfTask : qAsConst(MissionStatus.CurrentlyAllowedTasks))
|
||||
for (const auto &tmsIfTask : std::as_const(MissionStatus.CurrentlyAllowedTasks))
|
||||
{
|
||||
if (tmsIfTask.EnumeratedValue.empty())
|
||||
{
|
||||
@@ -83,7 +84,7 @@ void Dispatcher::ReportMissionStatus(M_MissionCtrl::MissionStatusType const& Mis
|
||||
DEBUG_LOG(m_logger) << "missionName before: " << missionName;
|
||||
if (missionName.empty())
|
||||
{
|
||||
for (const auto &additionalInfo : qAsConst(MissionStatus.CurrentAction.CurrentTask.AdditionalInfo))
|
||||
for (const auto &additionalInfo : std::as_const(MissionStatus.CurrentAction.CurrentTask.AdditionalInfo))
|
||||
{
|
||||
if (additionalInfo.Name == "MissionName" && additionalInfo.StrValue != "NoMission")
|
||||
{
|
||||
|
||||
+4
-4
@@ -39,10 +39,10 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginWlsTetra
|
||||
NGLLogger
|
||||
nglsettings
|
||||
PrtCnvLib
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::Sql
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::Sql
|
||||
Qt6::WebSockets
|
||||
tabPluginInterface
|
||||
tabTelegrams
|
||||
)
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_handler.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
#include "settings.h"
|
||||
#include <QJsonDocument>
|
||||
@@ -353,7 +354,7 @@ void IsmHandler::onMainFootprintChanged(const InfrastructureManagement::MainFoot
|
||||
m_buildingBoundingBoxes.insert(data.id(), BoundingBox);
|
||||
|
||||
m_relBuildingFootprints.insert(data.id(), relBuildingFootprint);
|
||||
for (const QPointF &p : qAsConst(relBuildingFootprint))
|
||||
for (const QPointF &p : std::as_const(relBuildingFootprint))
|
||||
DEBUG_LOG(m_logger) << "relBuildingFootprint = " << p.x() << "/" << p.y();
|
||||
rotateBuildingFootprint(data.id());
|
||||
break;
|
||||
@@ -369,7 +370,7 @@ void IsmHandler::onMainFootprintChanged(const InfrastructureManagement::MainFoot
|
||||
void IsmHandler::removeOpsDataByStructureElementId(int structureElementId)
|
||||
{
|
||||
auto copy = m_opsData;
|
||||
for (const OpsData &pd : qAsConst(copy))
|
||||
for (const OpsData &pd : std::as_const(copy))
|
||||
{
|
||||
if (pd.structureElementId == structureElementId)
|
||||
{
|
||||
@@ -383,7 +384,7 @@ void IsmHandler::removeOpsAsset(int assetId)
|
||||
{
|
||||
int opsCode = 0;
|
||||
|
||||
for (const OpsData &pd : qAsConst(m_opsData))
|
||||
for (const OpsData &pd : std::as_const(m_opsData))
|
||||
{
|
||||
if (pd.assetId == assetId)
|
||||
{
|
||||
@@ -446,7 +447,7 @@ void IsmHandler::updateOpsData(OpsData &data, bool force)
|
||||
const auto &mainStructureElements = m_dtcIsm->mainStructureElements();
|
||||
|
||||
|
||||
for (const auto &mse : qAsConst(mainStructureElements))
|
||||
for (const auto &mse : std::as_const(mainStructureElements))
|
||||
{
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "main_handler.h"
|
||||
#include <utility>
|
||||
#include "settings.h"
|
||||
#include "logger.h"
|
||||
#include "WebSocketInterface/Messages/reply_message.h"
|
||||
@@ -293,7 +294,7 @@ void MainHandler::onExerciseChanged(const ExerciseManagement::Exercise &data, Da
|
||||
m_txHandler->txData(exerciseStateData());
|
||||
|
||||
|
||||
for (const std::shared_ptr<Plugin::Interface> &ifc : qAsConst(m_interfaces))
|
||||
for (const std::shared_ptr<Plugin::Interface> &ifc : std::as_const(m_interfaces))
|
||||
ifc->exerciseChanged();
|
||||
}
|
||||
|
||||
@@ -353,7 +354,7 @@ void MainHandler::onDirectMessage(const QByteArray &jsonMessage)
|
||||
quint32 bitValue = 1U << it;
|
||||
QString name;
|
||||
QString isOk;
|
||||
for (const ProjectDataManagement::CanComponentString &ccs : qAsConst(m_ccsMap))
|
||||
for (const ProjectDataManagement::CanComponentString &ccs : std::as_const(m_ccsMap))
|
||||
{
|
||||
if (ccs.bitMask() == bitValue)
|
||||
{
|
||||
@@ -397,7 +398,7 @@ void MainHandler::onDirectMessage(const QByteArray &jsonMessage)
|
||||
}
|
||||
|
||||
|
||||
for (const auto &ele : qAsConst(biteError))
|
||||
for (const auto &ele : std::as_const(biteError))
|
||||
{
|
||||
QString text;
|
||||
QJsonObject error = ele.toObject();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "pdm_handler.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
@@ -106,7 +107,7 @@ ProjectDataManagement::GearClass PdmHandler::gearClassFromChargeTypeId(int charg
|
||||
|
||||
initializePdm();
|
||||
|
||||
for (const auto &gearType2ChargeType : qAsConst(m_gearTypeChargeTypes))
|
||||
for (const auto &gearType2ChargeType : std::as_const(m_gearTypeChargeTypes))
|
||||
{
|
||||
if (gearType2ChargeType.chargeTypeId() == chargeTypeId)
|
||||
{
|
||||
@@ -133,7 +134,7 @@ ProjectDataManagement::BuildingChargeEffect PdmHandler::buildingChargeEffect(int
|
||||
|
||||
initializePdm();
|
||||
|
||||
for (const auto &bce : qAsConst(m_buildingChargeEffects))
|
||||
for (const auto &bce : std::as_const(m_buildingChargeEffects))
|
||||
{
|
||||
if (bce.chargeTypeId() == chargeTypeId)
|
||||
return bce;
|
||||
@@ -215,7 +216,7 @@ int PdmHandler::chargeTypeIdFromGearAndChargeTasCode(int gearTasCode, int charge
|
||||
|
||||
if (gearTasCode > 0 && (gearTasCode & s_unknownMarker) == 0)
|
||||
{
|
||||
for (const auto &gearType2ChargeType : qAsConst(m_gearTypeChargeTypes))
|
||||
for (const auto &gearType2ChargeType : std::as_const(m_gearTypeChargeTypes))
|
||||
{
|
||||
if (gearType2ChargeType.gearTypeId() == gearTasCode)
|
||||
{
|
||||
@@ -245,7 +246,7 @@ int PdmHandler::gearTypeIdFromTasGearTasCode(int gearTasCode)
|
||||
|
||||
initializePdm();
|
||||
|
||||
for (const auto &gearType : qAsConst(m_gearTypes))
|
||||
for (const auto &gearType : std::as_const(m_gearTypes))
|
||||
{
|
||||
if (gearType.tasCode() == gearTasCode)
|
||||
return gearType.id();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "recv_from_dds_aes.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
#include "settings.h"
|
||||
#include <AreaEffectSimulation/Utils/polygons.h>
|
||||
@@ -655,7 +656,7 @@ void RecvFromDdsAes::onSendDusMineReactivationTimeout()
|
||||
{
|
||||
TetraIcd::DusMineReactivation out;
|
||||
out.dusSerialNumbers.reserve(m_minesToSend.size());
|
||||
for (const auto &mineId : qAsConst(m_minesToSend))
|
||||
for (const auto &mineId : std::as_const(m_minesToSend))
|
||||
{
|
||||
m_allReactivatableDusMines[mineId].triggered(false);
|
||||
out.dusSerialNumbers.push_back(mineId);
|
||||
@@ -780,7 +781,7 @@ void RecvFromDdsAes::onEffectsChanged(const AreaEffectSimulation::Effects &data,
|
||||
std::vector<TetraIcd::RelativePosition> &mhPointsRef = cAes.mhPoints;
|
||||
mhPointsRef.clear();
|
||||
mhPointsRef.reserve(aes.mhPoints().size());
|
||||
for (const Core::GeoPosition2D &pos : qAsConst(aes.mhPoints()))
|
||||
for (const Core::GeoPosition2D &pos : std::as_const(aes.mhPoints()))
|
||||
mhPointsRef.emplace_back(m_posHandler->geographicToRelative(pos, 0));
|
||||
|
||||
|
||||
@@ -941,7 +942,7 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::Expl
|
||||
std::vector<TetraIcd::RelativePosition> &mhPointsRef = cAes.mhPoints;
|
||||
mhPointsRef.clear();
|
||||
mhPointsRef.reserve(aes.mhPoints().size());
|
||||
for (const Core::GeoPosition2D &pos : qAsConst(aes.mhPoints()))
|
||||
for (const Core::GeoPosition2D &pos : std::as_const(aes.mhPoints()))
|
||||
mhPointsRef.emplace_back(m_posHandler->geographicToRelative(pos, 0));
|
||||
|
||||
int chargeTypeId = 0;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "recv_from_dds_fts.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
#include "ism_handler.h"
|
||||
#include "settings.h"
|
||||
@@ -712,7 +713,7 @@ QMap<int, QVector<RecvFromDdsFts::RemainEffectStruct>> RecvFromDdsFts::loadRemai
|
||||
QVector<RemainEffectStruct> resVec;
|
||||
|
||||
QStringList keyList = obj.keys();
|
||||
for (const auto &key : qAsConst(keyList))
|
||||
for (const auto &key : std::as_const(keyList))
|
||||
{
|
||||
const auto &val = obj.value(key).toObject();
|
||||
|
||||
@@ -721,7 +722,7 @@ QMap<int, QVector<RecvFromDdsFts::RemainEffectStruct>> RecvFromDdsFts::loadRemai
|
||||
|
||||
QStringList x = val.keys();
|
||||
int i=0;
|
||||
for (const auto &resElement : qAsConst(x))
|
||||
for (const auto &resElement : std::as_const(x))
|
||||
{
|
||||
const auto val2 = val.value(resElement).toInt();
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "send_to_dds.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
#include "settings.h"
|
||||
#include <DDS/DTS/generic_dts.h>
|
||||
@@ -865,7 +866,7 @@ void SendToDds::rxData(const TetraIcd::BatteryInfo &inData)
|
||||
batteryInfo.sampleTime(inData.header.timeStamp);
|
||||
std::vector<TrainingAreaBase::BatteryState> batteryStates;
|
||||
batteryStates.reserve(inData.batteryStates.size());
|
||||
for(const TetraIcd::BatteryState &batState : qAsConst(inData.batteryStates))
|
||||
for(const TetraIcd::BatteryState &batState : std::as_const(inData.batteryStates))
|
||||
{
|
||||
TrainingAreaBase::BatteryState batStateOut;
|
||||
batStateOut.batteryPort(batState.batteryPort);
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "training_area_telegrams.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
@@ -2906,7 +2907,7 @@ ExerciseEquipmentAssignmentComplete ExerciseEquipmentAssignmentComplete::fromJso
|
||||
ExerciseEquipmentAssignmentComplete ret;
|
||||
QJsonArray arrExercise;
|
||||
get(obj, QStringLiteral("exerciseEquipmentAssignments"), arrExercise);
|
||||
for (const auto &ele : qAsConst(arrExercise))
|
||||
for (const auto &ele : std::as_const(arrExercise))
|
||||
{
|
||||
const QJsonObject elem = ele.toObject();
|
||||
int exerciseId;
|
||||
@@ -2914,7 +2915,7 @@ ExerciseEquipmentAssignmentComplete ExerciseEquipmentAssignmentComplete::fromJso
|
||||
get(elem, QStringLiteral("exerciseId"), exerciseId);
|
||||
get(elem, QStringLiteral("equipmentNumbers"), equipmentNumbers);
|
||||
auto &cont = ret.exerciseEquipmentAssignments[exerciseId];
|
||||
for (const auto &eq : qAsConst(equipmentNumbers))
|
||||
for (const auto &eq : std::as_const(equipmentNumbers))
|
||||
cont.insert(eq.toInt());
|
||||
}
|
||||
get(obj, QStringLiteral("groupIssiInformation"), ret.groupIssiInformation);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "tx_mixin.h"
|
||||
#include <utility>
|
||||
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
@@ -20,7 +21,7 @@ bool TxMixin::removeTxHandler(const std::shared_ptr<SendToTab> &txCallback)
|
||||
|
||||
void TxMixin::resetSendCounter()
|
||||
{
|
||||
for (const std::shared_ptr<SendToTab> &tx : qAsConst(m_txHandler))
|
||||
for (const std::shared_ptr<SendToTab> &tx : std::as_const(m_txHandler))
|
||||
tx->resetSendCounter();
|
||||
}
|
||||
|
||||
@@ -280,7 +281,7 @@ bool TxMixin::txDataToAll(const T &data)
|
||||
|
||||
if (equipmentNumber == 0)
|
||||
{
|
||||
for (const std::shared_ptr<SendToTab> &tx : qAsConst(m_txHandler))
|
||||
for (const std::shared_ptr<SendToTab> &tx : std::as_const(m_txHandler))
|
||||
{
|
||||
const HandleState hs = tx->canHandleTelegram(equipmentNumber, TrainingAreaBase::TetraIcd::Constraints<T>::id());
|
||||
if (hs == HandleState::No)
|
||||
@@ -296,7 +297,7 @@ bool TxMixin::txDataToAll(const T &data)
|
||||
{
|
||||
bool bConsumed = false;
|
||||
std::shared_ptr<SendToTab> fallbackHandler;
|
||||
for (const std::shared_ptr<SendToTab> &tx : qAsConst(m_txHandler))
|
||||
for (const std::shared_ptr<SendToTab> &tx : std::as_const(m_txHandler))
|
||||
{
|
||||
const HandleState hs = tx->canHandleTelegram(equipmentNumber, TrainingAreaBase::TetraIcd::Constraints<T>::id());
|
||||
switch (hs)
|
||||
|
||||
@@ -44,7 +44,7 @@ NGL_TARGET_LINK_LIBRARIES(svcTabocCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddscore
|
||||
NGLLogger
|
||||
LtsUtilsCoreHeaderOnly
|
||||
@@ -163,10 +163,10 @@ SET(SRCS_exe
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcTrainingAreaBaseOC ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcTrainingAreaBaseOC
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::SerialPort
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::SerialPort
|
||||
Qt6::WebSockets
|
||||
LtsCoordTrans
|
||||
LtsSerialPortQuerry
|
||||
LtsCommandLineParser
|
||||
@@ -214,9 +214,9 @@ IF(BUILD_TESTING)
|
||||
|
||||
NGL_ADD_EXECUTABLE(AAR SV serialtest ${TEST_SRC})
|
||||
NGL_TARGET_LINK_LIBRARIES(serialtest
|
||||
Qt5::Core
|
||||
Qt5::SerialPort
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::SerialPort
|
||||
Qt6::Network
|
||||
LtsSerialPortQuerry
|
||||
svcTabocCommon
|
||||
LtsUtilsCore
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <utility>
|
||||
#include <QPointF>
|
||||
|
||||
#include <LtsUtilsCore/qbytearray_byteaccess.h>
|
||||
@@ -348,7 +349,7 @@ void HandlerAesData::bcContaminations(const QByteArray &data)
|
||||
m_aesFtc->bCContaminationModifyRequest(req, this);
|
||||
}
|
||||
|
||||
for (int id : qAsConst(aesToBeDeleted))
|
||||
for (int id : std::as_const(aesToBeDeleted))
|
||||
{
|
||||
if (m_aesDtc->bCContamination(id).isCentral())
|
||||
continue;
|
||||
@@ -453,7 +454,7 @@ void HandlerAesData::explosionAreas(const QByteArray &data)
|
||||
m_aesFtc->explosionClusterOcModifyRequest(req, this);
|
||||
}
|
||||
|
||||
for (int id : qAsConst(aesToBeDeleted))
|
||||
for (int id : std::as_const(aesToBeDeleted))
|
||||
{
|
||||
const AreaEffectSimulation::ExplosionCluster &exp = m_aesDtc->explosionCluster(id);
|
||||
|
||||
@@ -509,7 +510,7 @@ void HandlerAesData::explosionSingles(const QByteArray &data)
|
||||
m_aesFtc->explosionSingleModifyRequest(req, this);
|
||||
}
|
||||
|
||||
for (int id : qAsConst(aesToBeDeleted))
|
||||
for (int id : std::as_const(aesToBeDeleted))
|
||||
{
|
||||
const AreaEffectSimulation::ExplosionSingle &exp = m_aesDtc->explosionSingle(id);
|
||||
if (exp.isCentral())
|
||||
@@ -579,7 +580,7 @@ void HandlerAesData::functionalAreas(const QByteArray &data)
|
||||
m_aesFtc->functionalAreaModifyRequest(req, this);
|
||||
}
|
||||
|
||||
for (int id : qAsConst(aesToBeDeleted))
|
||||
for (int id : std::as_const(aesToBeDeleted))
|
||||
{
|
||||
if (m_aesDtc->functionalArea(id).isCentral())
|
||||
continue;
|
||||
@@ -636,7 +637,7 @@ void HandlerAesData::nContaminations(const QByteArray &data)
|
||||
m_aesFtc->nContaminationModifyRequest(req, this);
|
||||
}
|
||||
|
||||
for (int id : qAsConst(aesToBeDeleted))
|
||||
for (int id : std::as_const(aesToBeDeleted))
|
||||
{
|
||||
if (m_aesDtc->nContamination(id).isCentral())
|
||||
continue;
|
||||
@@ -709,7 +710,7 @@ void HandlerAesData::mineAreas(const QByteArray &data)
|
||||
m_aesFtc->mineAreaModifyFromCtaDataRequest(req, this);
|
||||
}
|
||||
|
||||
for (int id : qAsConst(aesToBeDeleted))
|
||||
for (int id : std::as_const(aesToBeDeleted))
|
||||
{
|
||||
if (m_aesDtc->mineArea(id).isCentral())
|
||||
continue;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "websocket_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
@@ -210,7 +211,7 @@ void WebsocketHandler::parseServices(const QString &message)
|
||||
}
|
||||
}
|
||||
|
||||
for (const QJsonValue &service : qAsConst(services))
|
||||
for (const QJsonValue &service : std::as_const(services))
|
||||
{
|
||||
const QJsonObject &obj = service.toObject();
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ CODEGEN_HANDLE_SVC_XML(SRCS_exe ${xml_FILE})
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcWarehouseManagement ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcWarehouseManagement
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
svcCoreClient
|
||||
svcExmClient # Read exercise topics
|
||||
svcPpmClient
|
||||
@@ -58,7 +58,7 @@ NGL_TARGET_LINK_LIBRARIES(svcWarehouseManagement
|
||||
nglcoreapplication
|
||||
nglsettings
|
||||
ngltools
|
||||
Qt5::WebSockets
|
||||
Qt6::WebSockets
|
||||
wms_json_ds
|
||||
)
|
||||
NGL_INSTALL_TARGET(svcWarehouseManagement)
|
||||
|
||||
@@ -39,9 +39,9 @@ CODEGEN_HANDLE_SVC_XML(SRCS_exe ${xml_FILE})
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcWirelessLocationSystem ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcWirelessLocationSystem
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
svcCoreClient
|
||||
svcIsmClient
|
||||
ddsconnector
|
||||
@@ -61,8 +61,8 @@ NGL_ADD_TARGET_LINK(svcWirelessLocationSystem pWLS)
|
||||
|
||||
NGL_ADD_EXECUTABLE(AAR SV wlsJsonClientTest wls_json_client_test.cpp wls_json_client_test.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(wlsJsonClientTest
|
||||
Qt5::Core
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::WebSockets
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY2(SfmConverter AAR SV SHARED
|
||||
@@ -80,7 +80,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(SfmConverter
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(SfmConverter
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
LtsUtilsCore
|
||||
NGLLogger
|
||||
)
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "web_socket_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include "ism_handler.h"
|
||||
#include "main_handler.h"
|
||||
@@ -87,7 +88,7 @@ void WebSocketHandler::onNewConnection()
|
||||
connState.connectedToSystem = m_wlsHandler->isConnected();
|
||||
sendTelegram(&connState, 0);
|
||||
|
||||
for (const WlsParticipant *participant : qAsConst(m_participantHandler->participants()))
|
||||
for (const WlsParticipant *participant : std::as_const(m_participantHandler->participants()))
|
||||
sendDataCommunicationState(participant);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "wls_participant_handler.h"
|
||||
#include <utility>
|
||||
#include "web_socket_handler.h"
|
||||
#include "wls_handler.h"
|
||||
|
||||
@@ -104,7 +105,7 @@ void WlsParticipantHandler::handleWlsBinarySfmData(const TrainingAreaBase::Tetra
|
||||
void WlsParticipantHandler::onGpsOnOffTimeoutTimer()
|
||||
{
|
||||
const qint64 tNow = QDateTime::currentMSecsSinceEpoch();
|
||||
for (WlsParticipant *p : qAsConst(m_participantsByTagId))
|
||||
for (WlsParticipant *p : std::as_const(m_participantsByTagId))
|
||||
p->checkGpsOnOffTimeoutTimer(tNow);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user