Adds immediate migration results

This commit is contained in:
torsten committed 2026-08-18 22:12:24 +02:00
1 parent ba4121728b
commit 6a2a0667ab
2395 files changed
+357322 -2524

No files matched your search

@@ -7,6 +7,7 @@
*/
#include "handler_oc_situation_data.h"
#include <utility>
#include <LtsCoordTrans/lts_coord_trans.h>
#include <LtsUtilsCore/qbytearray_byteaccess.h>
@@ -183,7 +184,7 @@ void HandlerOcSituationData::setRequestOcSituationData(OcSituation::SituationCen
if (m_centerEquipmentId > 0)
{
ParticipantManagement::Participant centerParticipant;
for (const auto &participant : qAsConst(m_allParticipants))
for (const auto &participant : std::as_const(m_allParticipants))
{
if (participant.equipmentNumber().is_set() && participant.equipmentNumber().get() == m_centerEquipmentId)
{
@@ -433,7 +434,7 @@ void HandlerOcSituationData::onAesItemViewChanged(const AreaEffectSimulation::Ae
void HandlerOcSituationData::onDusMineStateChanged(const AreaEffectSimulation::DusMineState &/*data*/, DataModification /*modType*/)
{
auto copy = m_dynamicParticpantData;
for (const ParticipantManagement::DynamicParticipantData &dynPartData : qAsConst(copy))
for (const ParticipantManagement::DynamicParticipantData &dynPartData : std::as_const(copy))
{
if (!m_participantWithMaybeMissingPartyId.contains(dynPartData.participantId()))
continue;
@@ -528,7 +529,7 @@ void HandlerOcSituationData::fetchParticipantsInRange()
QSet<int> curParticipants;
const QHash<int, ParticipantManagement::Participant> oldParticipants = m_participants;
for (const auto &position : qAsConst(m_allParticipantPositions))
for (const auto &position : std::as_const(m_allParticipantPositions))
{
if (!LtsUtils::isPositionTimeOutdated(m_partitionTime, position.sampleTime())) // only if position is not outdated
{
@@ -645,7 +646,7 @@ QVector<QPair<int, float>> HandlerOcSituationData::createPrioQueue() const
QVector<QPair<int, float>> participantsPrioQueue;
participantsPrioQueue.reserve(m_participantsToSend.size());
for (auto participantId : qAsConst(m_participantsToSend))
for (auto participantId : std::as_const(m_participantsToSend))
{
// ignore (currently) outdated players
if (m_outdatedParticipants.contains(participantId))
@@ -691,7 +692,7 @@ QByteArray HandlerOcSituationData::createDataStream(int maxSize,
// first: participants that are not in range any more
DEBUG_LOG(m_logger) << "m_newlyOutdatedParticipants: " << m_newlyOutdatedParticipants.size();
QSet<int> copyOfOutdated = m_newlyOutdatedParticipants;
for (const auto participantId : qAsConst(m_newlyOutdatedParticipants))
for (const auto participantId : std::as_const(m_newlyOutdatedParticipants))
{
addParticipantId(ret, participantId, OcSituation::ModificationFlag::eNone);
copyOfOutdated.remove(participantId);