fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
+2
-1
@@ -7,6 +7,7 @@
|
||||
* Created by Hannes Baeuerle, SLSE, 2016-05-12
|
||||
*/
|
||||
#include "participant_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include "participant.h"
|
||||
#include "ppm_common.h"
|
||||
@@ -43,7 +44,7 @@ void ParticipantHandler::clearParticipants()
|
||||
dts()->removeHitLineInfoByKey(it.value().id());
|
||||
m_hitLineInfoMap.clear();
|
||||
|
||||
for (auto p : qAsConst(m_participants))
|
||||
for (auto p : std::as_const(m_participants))
|
||||
{
|
||||
p->removeFromDds();
|
||||
delete p;
|
||||
|
||||
+18
-17
@@ -7,6 +7,7 @@
|
||||
* Created by Hannes Baeuerle, SLSE, 2016-05-12
|
||||
*/
|
||||
#include "participant_handler_for_exercise.h"
|
||||
#include <utility>
|
||||
|
||||
#include "convert_db_to_dds.h"
|
||||
#include "firing_unit_validator.h"
|
||||
@@ -168,7 +169,7 @@ bool ParticipantHandlerForExercise::init()
|
||||
}
|
||||
|
||||
// remove the 'unused' EquipmentExerciseMappings (for whatever reason there are some...)
|
||||
for (const auto &eem : qAsConst(localEquipmentExerciseMappings))
|
||||
for (const auto &eem : std::as_const(localEquipmentExerciseMappings))
|
||||
dbEx0->removeEquipmentExerciseMapping(eem);
|
||||
|
||||
// after m_publishEquipmentExerciseMappings has been set and participants are created
|
||||
@@ -189,7 +190,7 @@ bool ParticipantHandlerForExercise::init()
|
||||
bool isOwnPositionParticipant = false;
|
||||
|
||||
// publish participants in dds
|
||||
for (Participant *p : qAsConst(m_participants))
|
||||
for (Participant *p : std::as_const(m_participants))
|
||||
{
|
||||
if (p->equipmentNumber() == 1)
|
||||
isOwnPositionParticipant = true;
|
||||
@@ -309,7 +310,7 @@ bool ParticipantHandlerForExercise::init()
|
||||
dtc->equipmentExerciseMappings([this](const EquipmentExerciseMapping &data) { onEquipmentExerciseMappingChanged(data, DataModification::eAdded); });
|
||||
|
||||
auto pub = dts();
|
||||
for (const ParticipantOrganisation &partOrga : qAsConst(m_participantOrganisations))
|
||||
for (const ParticipantOrganisation &partOrga : std::as_const(m_participantOrganisations))
|
||||
pub->publish(partOrga);
|
||||
|
||||
if (m_mainHandler->exerciseId() > 0)
|
||||
@@ -351,7 +352,7 @@ bool ParticipantHandlerForExercise::init()
|
||||
m_pdmDtc->waitForHistoricalDataGearTypeChargeType();
|
||||
}
|
||||
|
||||
// for(const auto &participant : qAsConst(m_participants))
|
||||
// for(const auto &participant : std::as_const(m_participants))
|
||||
// customedSetGearCharges(participant);
|
||||
|
||||
return true;
|
||||
@@ -454,7 +455,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe
|
||||
|
||||
checkLongActionBreak();
|
||||
|
||||
for (const ParticipantManagement::ParticipantData ¤tParticipant : qAsConst(validateData.participantsToBeCreatedOrModified))
|
||||
for (const ParticipantManagement::ParticipantData ¤tParticipant : std::as_const(validateData.participantsToBeCreatedOrModified))
|
||||
{
|
||||
auto ret = validateParticipantData(validateData, currentParticipant);
|
||||
if (ret.error())
|
||||
@@ -596,7 +597,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe
|
||||
DEBUG_LOG(m_logger) << "New participants created and existing participants updated";
|
||||
|
||||
// build hierarchy
|
||||
for (const ParticipantData ¤tData : qAsConst(validateData.participantsToBeCreatedOrModified)) // first set superiorIds
|
||||
for (const ParticipantData ¤tData : std::as_const(validateData.participantsToBeCreatedOrModified)) // first set superiorIds
|
||||
{
|
||||
Participant *participantToUpdate = participantById(validateData.modIdToParticipantId.value(currentData.modId()));
|
||||
if (currentData.superiorModId() >= 0) // superiorModId < 0 -> no change in superior
|
||||
@@ -612,7 +613,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe
|
||||
QHash<int, std::vector<int32_t>> inferiors;
|
||||
inferiors.reserve(m_participants.size() / 2);
|
||||
// first collect all inferiors per superior
|
||||
for (const Participant *currentParticipant : qAsConst(m_participants))
|
||||
for (const Participant *currentParticipant : std::as_const(m_participants))
|
||||
{
|
||||
int superiorId = currentParticipant->superiorId();
|
||||
inferiors[superiorId].push_back(currentParticipant->id());
|
||||
@@ -625,7 +626,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe
|
||||
}
|
||||
}
|
||||
// now update all participants with newly collected inferiors
|
||||
for (Participant *currentParticipant : qAsConst(m_participants))
|
||||
for (Participant *currentParticipant : std::as_const(m_participants))
|
||||
{
|
||||
if (currentParticipant->hasNewInferiorStructure(inferiors.value(currentParticipant->id())))
|
||||
participantsWithChanges.insert(currentParticipant);
|
||||
@@ -635,7 +636,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe
|
||||
// update in Database
|
||||
std::vector<Database::PpmParticipant> dbParticipantsToUpdate;
|
||||
dbParticipantsToUpdate.reserve(participantsWithChanges.size());
|
||||
for (Participant *currentParticipant : qAsConst(participantsWithChanges))
|
||||
for (Participant *currentParticipant : std::as_const(participantsWithChanges))
|
||||
{
|
||||
dbParticipantsToUpdate.push_back(currentParticipant->toDbParticipant());
|
||||
partiesUsed.insert(currentParticipant->partyId());
|
||||
@@ -651,13 +652,13 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe
|
||||
|
||||
// mark parties in use
|
||||
ChangePartyUsedStateRequest req;
|
||||
for (int partyId : qAsConst(partiesUsed))
|
||||
for (int partyId : std::as_const(partiesUsed))
|
||||
{
|
||||
req.partyId(partyId);
|
||||
req.isUsedBy(true);
|
||||
m_mainHandler->partyHandler()->changePartyUsedStateRequest(req);
|
||||
}
|
||||
for (int partyId : qAsConst(partiesWithDeletedOrMovedOutParticipants))
|
||||
for (int partyId : std::as_const(partiesWithDeletedOrMovedOutParticipants))
|
||||
{
|
||||
req.partyId(partyId);
|
||||
req.isUsedBy(false);
|
||||
@@ -726,7 +727,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe
|
||||
QJsonArray jsonArray;
|
||||
|
||||
// finally ... publish participant data via dds if no error occured
|
||||
for (Participant *currentParticipant : qAsConst(participantsWithChanges))
|
||||
for (Participant *currentParticipant : std::as_const(participantsWithChanges))
|
||||
{
|
||||
currentParticipant->publishParticipant();
|
||||
NOTICE_LOG(m_logger) << "publishParticipant id=" << currentParticipant->id();
|
||||
@@ -1292,7 +1293,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::selectiveReammunitionRe
|
||||
tabRequest.participantId(request.id());
|
||||
tabRequest.gearId(request.gearId());
|
||||
INFO_LOG(m_logger) << "Gear id = " << request.gearId();
|
||||
for (const Reammunition ra : qAsConst(request.reammunition()))
|
||||
for (const Reammunition ra : std::as_const(request.reammunition()))
|
||||
{
|
||||
TrainingAreaBase::Reammunition tabRa;
|
||||
tabRa.chargeTypeId(ra.chargeTypeId());
|
||||
@@ -1367,7 +1368,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::setSimulatedPositionReq
|
||||
{
|
||||
if (request.participantId() <= 0)
|
||||
{
|
||||
for (Participant *participant : qAsConst(m_participants))
|
||||
for (Participant *participant : std::as_const(m_participants))
|
||||
{
|
||||
if (participant->isDeleted() || participant->superiorId() != 0)
|
||||
continue;
|
||||
@@ -1507,7 +1508,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::validateParticipantData
|
||||
DEBUG_LOG(m_logger) << "checking superiorIds";
|
||||
// superior exists?
|
||||
bool isExistingSuperiorId = false;
|
||||
for (const ParticipantData &dat : qAsConst(data.participantsToBeCreatedOrModified))
|
||||
for (const ParticipantData &dat : std::as_const(data.participantsToBeCreatedOrModified))
|
||||
{
|
||||
if (participantToValidate.superiorModId() == dat.modId())
|
||||
{
|
||||
@@ -1529,7 +1530,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::validateParticipantData
|
||||
|
||||
// all hierarchy numbers with same superior unique?
|
||||
DEBUG_LOG(m_logger) << "checking hierarchyNumbers";
|
||||
for (const ParticipantData &dat : qAsConst(data.participantsToBeCreatedOrModified))
|
||||
for (const ParticipantData &dat : std::as_const(data.participantsToBeCreatedOrModified))
|
||||
{
|
||||
// operator==() on optionals returns false if not set ...
|
||||
if (dat.modId() != participantToValidate.modId() && dat.superiorModId() == participantToValidate.superiorModId()
|
||||
@@ -1803,7 +1804,7 @@ void ParticipantHandlerForExercise::onEquipmentExerciseMappingChanged(const Equi
|
||||
case DataModification::eModified:
|
||||
{
|
||||
QSet<int> oldEqIds;
|
||||
for (const auto &db : qAsConst(m_equipmentExerciseMappings))
|
||||
for (const auto &db : std::as_const(m_equipmentExerciseMappings))
|
||||
{
|
||||
if (db.exerciseId != data.exerciseId())
|
||||
continue;
|
||||
|
||||
+2
-1
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "PartyHandling/party_handler.h"
|
||||
#include <utility>
|
||||
#include "PartyHandling/party.h"
|
||||
#include <ngldb/db_service_handler.h>
|
||||
#include <ppm_db.h>
|
||||
@@ -63,7 +64,7 @@ bool PartyHandling::PartyHandler::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( Database::PpmParty currentParty : qAsConst(partyVec))
|
||||
for ( Database::PpmParty currentParty : std::as_const(partyVec))
|
||||
{
|
||||
resetAdlerProperties(currentParty.properties, currentParty.id);
|
||||
PartyHandling::Party *newParty = new PartyHandling::Party(currentParty);
|
||||
|
||||
+2
-1
@@ -8,6 +8,7 @@
|
||||
|
||||
|
||||
#include "participant_handler_for_replay.h"
|
||||
#include <utility>
|
||||
|
||||
#include "participant_for_replay.h"
|
||||
#include "ppm_record_replay_plugin_custom.h"
|
||||
@@ -88,7 +89,7 @@ void ParticipantHandlerForReplay::setDynamicParticipantData(const ParticipantMan
|
||||
|
||||
void ParticipantHandlerForReplay::publishData()
|
||||
{
|
||||
for (auto p : qAsConst(m_participants))
|
||||
for (auto p : std::as_const(m_participants))
|
||||
{
|
||||
p->publishParticipant();
|
||||
p->publishDynamicData();
|
||||
|
||||
+7
-6
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "ppm_record_replay_plugin_custom.h"
|
||||
#include <utility>
|
||||
#include "participant_handler_for_replay.h"
|
||||
#include <DDS/DTS/generic_dts_impl.h>
|
||||
#include <DDS/DTC/generic_dtc_impl.h>
|
||||
@@ -179,11 +180,11 @@ bool RecordReplayPluginCustom::setReplayStartTime(NSqlQuery &q, qint64 startTime
|
||||
m_participantHandler->clearParticipants();
|
||||
INFO_LOG(m_logger) << "setReplayStartTime-clearParticipants " << startTime << " DONE";
|
||||
|
||||
for (const auto &ddsParticipant : qAsConst(m_participantMap))
|
||||
for (const auto &ddsParticipant : std::as_const(m_participantMap))
|
||||
m_participantHandler->createUpdateParticipant(ddsParticipant);
|
||||
INFO_LOG(m_logger) << "setReplayStartTime-createUpdateParticipant " << startTime << " DONE";
|
||||
|
||||
for (const auto &dynParticipant : qAsConst(m_dynamicParticipantDataMap))
|
||||
for (const auto &dynParticipant : std::as_const(m_dynamicParticipantDataMap))
|
||||
m_participantHandler->setDynamicParticipantData(dynParticipant);
|
||||
INFO_LOG(m_logger) << "setReplayStartTime-setDynamicParticipantData " << startTime << " DONE";
|
||||
|
||||
@@ -223,9 +224,9 @@ bool RecordReplayPluginCustom::publishData(qint64 desiredTime)
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const Participant &p : qAsConst(m_participantMap))
|
||||
for (const Participant &p : std::as_const(m_participantMap))
|
||||
m_participantHandler->createUpdateParticipant(p);
|
||||
for (const Participant &p : qAsConst(m_participantDisposedMap))
|
||||
for (const Participant &p : std::as_const(m_participantDisposedMap))
|
||||
m_participantHandler->removeParticipant(p);
|
||||
|
||||
setDataForParticipants(desiredTime);
|
||||
@@ -289,7 +290,7 @@ QVector<QFuture<void>> RecordReplayPluginCustom::makeConcurrentWithoutEquipNo(T
|
||||
it = content.erase(it);
|
||||
} // while
|
||||
|
||||
for (auto contentIndex : qAsConst(contentVec))
|
||||
for (auto contentIndex : std::as_const(contentVec))
|
||||
{
|
||||
// execute in workerThread
|
||||
result.append(QtConcurrent::run([this, contentIndex]()
|
||||
@@ -325,7 +326,7 @@ QVector<QFuture<void>> RecordReplayPluginCustom::makeConcurrent(T &content, qint
|
||||
it = content.erase(it);
|
||||
} // while
|
||||
|
||||
for (auto contentIndex : qAsConst(contentVec))
|
||||
for (auto contentIndex : std::as_const(contentVec))
|
||||
{
|
||||
// execute in workerThread
|
||||
result.append(QtConcurrent::run([this, contentIndex]()
|
||||
|
||||
+9
-8
@@ -7,6 +7,7 @@
|
||||
* Created by Hannes Baeuerle, SLSE, 2016-07-27
|
||||
*/
|
||||
#include "template_handler.h"
|
||||
#include <utility>
|
||||
#include "template.h"
|
||||
#include "main_handler.h"
|
||||
#include <TypeHandling/type_donator.h>
|
||||
@@ -114,7 +115,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
futureVec += fut;
|
||||
}
|
||||
|
||||
for (const QFuture<Core::FunctionReplyObject> ¤tFut : qAsConst(futureVec))
|
||||
for (const QFuture<Core::FunctionReplyObject> ¤tFut : std::as_const(futureVec))
|
||||
{
|
||||
Core::FunctionReplyObject ret = currentFut.result();
|
||||
if (ret.error())
|
||||
@@ -123,7 +124,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const ParticipantManagement::TemplateData ¤tTemplate : qAsConst(templatesToBeCreatedOrModified))
|
||||
for (const ParticipantManagement::TemplateData ¤tTemplate : std::as_const(templatesToBeCreatedOrModified))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Validating template: " << currentTemplate;
|
||||
auto ret = validateTemplateData(templatesToBeCreatedOrModified, modIdToTemplateId, currentTemplate);
|
||||
@@ -139,7 +140,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
// create new and update existing templates
|
||||
DEBUG_LOG(m_logger) << "Creating new and updating existing templates ...";
|
||||
|
||||
for (const TemplateData ¤tData : qAsConst(templatesToBeCreatedOrModified))
|
||||
for (const TemplateData ¤tData : std::as_const(templatesToBeCreatedOrModified))
|
||||
{
|
||||
Template *templateToUpdate = m_templates.value(modIdToTemplateId.value(currentData.modId()));
|
||||
if (!templateToUpdate)
|
||||
@@ -164,7 +165,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
DEBUG_LOG(m_logger) << "New templates created and existing templates updated";
|
||||
|
||||
// build hierarchy
|
||||
for (const TemplateData ¤tData : qAsConst(templatesToBeCreatedOrModified)) // first set superiorIds
|
||||
for (const TemplateData ¤tData : std::as_const(templatesToBeCreatedOrModified)) // first set superiorIds
|
||||
{
|
||||
Template *templateToUpdate = m_templates.value(modIdToTemplateId.value(currentData.modId()), nullptr);
|
||||
const int superiorId = modIdToTemplateId.value(currentData.superiorModId());
|
||||
@@ -174,7 +175,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
templatesWithChanges.append(templateToUpdate);
|
||||
}
|
||||
|
||||
for (Template *currentTemplate : qAsConst(m_templates)) // set inferiorIds
|
||||
for (Template *currentTemplate : std::as_const(m_templates)) // set inferiorIds
|
||||
{
|
||||
if (!currentTemplate->hasNewInferiorStructure(inferiorIdsForTemplate(currentTemplate->id())) ||
|
||||
templatesWithChanges.contains(currentTemplate))
|
||||
@@ -184,7 +185,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
}
|
||||
|
||||
// update in Database
|
||||
for (Template *currentTemplate : qAsConst(templatesWithChanges))
|
||||
for (Template *currentTemplate : std::as_const(templatesWithChanges))
|
||||
{
|
||||
if (!m_mainHandler->db()->update(currentTemplate->dbEntry()))
|
||||
return Core::FunctionReplyObject(tr_lts("dds", "Could not update template data in database, template data may be inconsistent"));
|
||||
@@ -192,7 +193,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
trans.commit();
|
||||
|
||||
// finally ... publish template data via dds if no error occured
|
||||
for (Template *currentTemplate : qAsConst(templatesWithChanges))
|
||||
for (Template *currentTemplate : std::as_const(templatesWithChanges))
|
||||
m_mainHandler->exAnyDts()->publish(currentTemplate->toDdsTemplateParticipant());
|
||||
|
||||
return Core::FunctionReplyObject();
|
||||
@@ -203,7 +204,7 @@ std::vector<int32_t> TemplateHandler::inferiorIdsForTemplate(int32_t superiorTem
|
||||
std::vector<int32_t> result;
|
||||
result.reserve(10);
|
||||
|
||||
for (Template *currentTemplate : qAsConst(m_templates))
|
||||
for (Template *currentTemplate : std::as_const(m_templates))
|
||||
{
|
||||
if (currentTemplate->superiorId() == superiorTemplateId)
|
||||
{
|
||||
|
||||
+5
-4
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <ngldb/db_service_handler.h>
|
||||
#include <utility>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
#include "main_handler.h"
|
||||
#include "ParticipantHandling/participant.h"
|
||||
@@ -90,7 +91,7 @@ bool MissionPlanHandler::loadMissionPlansFromDb()
|
||||
<<" Items size = "<<missionItemVec.size()
|
||||
<<" Actions size = "<<missionActionVec.size();
|
||||
// add to internal buffer
|
||||
for (const ParticipantManagement::Database::PpmMissionPlan &data : qAsConst(missionPlanVec))
|
||||
for (const ParticipantManagement::Database::PpmMissionPlan &data : std::as_const(missionPlanVec))
|
||||
{
|
||||
ParticipantManagement::MissionPlan missionPlan;
|
||||
missionPlan.id(data.id);
|
||||
@@ -105,12 +106,12 @@ bool MissionPlanHandler::loadMissionPlansFromDb()
|
||||
QMultiMap <int, ParticipantManagement::Database::PpmMissionAction> actionsDbMap;
|
||||
//get mission items and actions for curr mission plan id
|
||||
|
||||
for (const ParticipantManagement::Database::PpmMissionItem &itemDb : qAsConst(missionItemVec))
|
||||
for (const ParticipantManagement::Database::PpmMissionItem &itemDb : std::as_const(missionItemVec))
|
||||
{
|
||||
if (itemDb.missionPlanId == data.id)
|
||||
{
|
||||
itemsDbMap.insert(itemDb.elementNumber, itemDb);
|
||||
for (const ParticipantManagement::Database::PpmMissionAction &actionDb : qAsConst(missionActionVec) )
|
||||
for (const ParticipantManagement::Database::PpmMissionAction &actionDb : std::as_const(missionActionVec) )
|
||||
{
|
||||
if (actionDb.missionItemId == itemDb.id)
|
||||
actionsDbMap.insert(actionDb.missionItemId, actionDb);
|
||||
@@ -120,7 +121,7 @@ bool MissionPlanHandler::loadMissionPlansFromDb()
|
||||
|
||||
|
||||
missionPlan.items().reserve(itemsDbMap.size());
|
||||
for (const ParticipantManagement::Database::PpmMissionItem &item : qAsConst(itemsDbMap))
|
||||
for (const ParticipantManagement::Database::PpmMissionItem &item : std::as_const(itemsDbMap))
|
||||
{
|
||||
ParticipantManagement::MissionItem msi;
|
||||
msi.actions().reserve(actionsDbMap.size());
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "object_mission_plan.h"
|
||||
#include <utility>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
namespace ParticipantManagement
|
||||
@@ -78,7 +79,7 @@ void ObjectMissionPlan::setDbMissionItems(const QMap<int, ParticipantManagement:
|
||||
m_mapMissionItems.clear();
|
||||
m_dbMissionActions.clear();
|
||||
|
||||
for (const ParticipantManagement::Database::PpmMissionItem &item : qAsConst(dbItems))
|
||||
for (const ParticipantManagement::Database::PpmMissionItem &item : std::as_const(dbItems))
|
||||
{
|
||||
ParticipantManagement::MissionItem msi;
|
||||
msi.actions().reserve(dbActions.size());
|
||||
|
||||
+3
-2
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "uas_handler.h"
|
||||
#include <utility>
|
||||
#include "uas.h"
|
||||
#include <ngldb/db_service_handler.h>
|
||||
#include "main_handler.h"
|
||||
@@ -53,7 +54,7 @@ bool UasHandler::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const Database::PpmUas ¤tUas : qAsConst(uasVec))
|
||||
for (const Database::PpmUas ¤tUas : std::as_const(uasVec))
|
||||
{
|
||||
UasHandling::Uas *newUas = new UasHandling::Uas(currentUas);
|
||||
|
||||
@@ -283,7 +284,7 @@ void UasHandler::onUASRadioLinkConnectionStatusChanged(const UASRadioLinkConnect
|
||||
|
||||
bool UasHandler::hostNameHostPortExists(const QString &hostname, int hostport, int uasId)
|
||||
{
|
||||
for (Uas *uas : qAsConst(m_uass))
|
||||
for (Uas *uas : std::as_const(m_uass))
|
||||
{
|
||||
if (uas->id() == uasId)
|
||||
continue;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "ppm_common.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QDebug>
|
||||
@@ -36,7 +37,7 @@ StateInformation youngestStateInformation(const std::vector<ParticipantManagemen
|
||||
}
|
||||
|
||||
// bool readyToDebug = false;
|
||||
// for (const ParticipantManagement::StateInformation &si : qAsConst(stateList))
|
||||
// for (const ParticipantManagement::StateInformation &si : std::as_const(stateList))
|
||||
// {
|
||||
// if (si.originatorId() == 0
|
||||
// && si.originatorType() == ProjectDataManagement::StateChangeOriginator::ExerciseControl
|
||||
@@ -78,14 +79,14 @@ StateInformation youngestStateInformation(const std::vector<ParticipantManagemen
|
||||
if (debug)
|
||||
{
|
||||
qWarning() << ">> printing all SIs";
|
||||
for (const ParticipantManagement::StateInformation &si : qAsConst(sortedStateList))
|
||||
for (const ParticipantManagement::StateInformation &si : std::as_const(sortedStateList))
|
||||
qWarning() << ">>>> si" << "siVulnId" << (uint8_t)si.vulnerabilityState << "bits" << si.vulnerabilityBits << "time" << si.stateTime;
|
||||
|
||||
qWarning() << ">> checking SIs";
|
||||
}
|
||||
|
||||
|
||||
for (const ParticipantManagement::StateInformation &si : qAsConst(sortedStateList))
|
||||
for (const ParticipantManagement::StateInformation &si : std::as_const(sortedStateList))
|
||||
{
|
||||
const uint8_t siVulnId = static_cast<uint8_t>(si.vulnerabilityState);
|
||||
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "ppm_dtc_impl_custom.h"
|
||||
#include <utility>
|
||||
#include "ppm_common.h"
|
||||
#include <DDS/DTC/generic_dtc.h>
|
||||
#include <DDS/Generic/generic_data_reader.h>
|
||||
@@ -744,7 +745,7 @@ int DtcImplCustom::getParticipantFromPrf(int prf) const
|
||||
|
||||
for (const DynamicParticipantData &sample : m_dtcDynamicParticipantData->readAlive())
|
||||
{
|
||||
for (const auto &designation : qAsConst(sample.designations))
|
||||
for (const auto &designation : std::as_const(sample.designations))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " code=" << designation.code;
|
||||
if (designation.code == prf)
|
||||
@@ -768,7 +769,7 @@ int DtcImplCustom::getPrfFromParticipant(int participantId) const
|
||||
if (participantId == sample.participantId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantId=" << sample.participantId << " designations.size()=" << sample.designations.size();
|
||||
for (const auto &designation : qAsConst(sample.designations))
|
||||
for (const auto &designation : std::as_const(sample.designations))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " code=" << designation.code;
|
||||
if (designation.code > 0)
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "web_socket_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QWebSocket>
|
||||
#include <QJsonObject>
|
||||
@@ -25,7 +26,7 @@ WebSocketHandler::WebSocketHandler(QObject *parent)
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{
|
||||
for (const auto& ws : qAsConst(m_webSockets))
|
||||
for (const auto& ws : std::as_const(m_webSockets))
|
||||
{
|
||||
ws->disconnect(this);
|
||||
}
|
||||
@@ -70,7 +71,7 @@ bool WebSocketHandler::sendTelegramInternal(const ParticipantPosition &pos, int
|
||||
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;
|
||||
|
||||
Reference in new issue
Block a user