fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
+4
-3
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "unit_test.h"
|
||||
#include <utility>
|
||||
|
||||
#include <TargetManagement/shootback_controller.h>
|
||||
|
||||
@@ -321,7 +322,7 @@ void tgtTestShootbackTarget::removeTestObjects()
|
||||
{
|
||||
QMap<qint32, TargetManagement::TargetAreaAssignment> allObj = m_dtcTgt->targetAreaAssignments();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " TargetAreaAssignments)";
|
||||
for (auto item: qAsConst(allObj))
|
||||
for (auto item: std::as_const(allObj))
|
||||
if (item.name().substr(0, 8).compare("UnitTest") == 0)
|
||||
removeAssignment(item.id());
|
||||
QTest::qWait(250); // time to process reply
|
||||
@@ -333,7 +334,7 @@ void tgtTestShootbackTarget::removeTestObjects()
|
||||
{
|
||||
QMap<qint32, TargetManagement::ShootbackArea> allObj = m_dtcTgt->shootbackAreas();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " Areas)";
|
||||
for (auto item: qAsConst(allObj))
|
||||
for (auto item: std::as_const(allObj))
|
||||
if (item.name().substr(0, 8).compare("UnitTest") == 0)
|
||||
removeArea(item.id());
|
||||
QTest::qWait(250); // time to process reply
|
||||
@@ -345,7 +346,7 @@ void tgtTestShootbackTarget::removeTestObjects()
|
||||
{
|
||||
QMap<qint32, TargetManagement::ShootbackTarget> allObj = m_dtcTgt->shootbackTargets();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " Targets)";
|
||||
for (auto item: qAsConst(allObj))
|
||||
for (auto item: std::as_const(allObj))
|
||||
if (item.name().substr(0, 8).compare("UnitTest") == 0)
|
||||
removeTarget(item.id());
|
||||
QTest::qWait(250); // time to process reply
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "main_handler.h"
|
||||
#include <utility>
|
||||
#include "handler_target_area_assignment.h"
|
||||
#include "handler_shootback_target.h"
|
||||
#include "object_shootback_target.h"
|
||||
@@ -68,7 +69,7 @@ bool HandlerShootbackTarget::init()
|
||||
|
||||
ObjectShootbackTarget *HandlerShootbackTarget::dataForTargetParticipantId(int targetParticipantId) const
|
||||
{
|
||||
for (ObjectShootbackTarget *item : qAsConst(m_objectMap))
|
||||
for (ObjectShootbackTarget *item : std::as_const(m_objectMap))
|
||||
{
|
||||
if (!item)
|
||||
continue;
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "main_handler.h"
|
||||
#include <utility>
|
||||
#include "handler_target_area_assignment.h"
|
||||
#include "object_target_area_assignment.h"
|
||||
|
||||
@@ -67,7 +68,7 @@ bool HandlerTargetAreaAssignment::init()
|
||||
|
||||
bool HandlerTargetAreaAssignment::isAreaIdUsedInAny(int areaId)
|
||||
{
|
||||
for (const ObjectTargetAreaAssignment *sample : qAsConst(m_objectMap))
|
||||
for (const ObjectTargetAreaAssignment *sample : std::as_const(m_objectMap))
|
||||
if (sample && (sample->getData().areaId() == areaId))
|
||||
return true;
|
||||
return false;
|
||||
@@ -75,7 +76,7 @@ bool HandlerTargetAreaAssignment::isAreaIdUsedInAny(int areaId)
|
||||
|
||||
bool HandlerTargetAreaAssignment::isTargetDataIdUsedInAny(int targetDataId)
|
||||
{
|
||||
for (const ObjectTargetAreaAssignment *sample : qAsConst(m_objectMap))
|
||||
for (const ObjectTargetAreaAssignment *sample : std::as_const(m_objectMap))
|
||||
if (sample && (sample->getData().targetParticipantId() == targetDataId))
|
||||
return true;
|
||||
return false;
|
||||
|
||||
+5
-4
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "shootback_controller.h"
|
||||
#include <utility>
|
||||
#include "object_shootback_area.h"
|
||||
#include "object_shootback_target.h"
|
||||
#include "object_target_area_assignment.h"
|
||||
@@ -275,7 +276,7 @@ void ShootbackController::onParticipantPositionChanged(const ParticipantManageme
|
||||
DEBUG_LOG(m_logger) << " areaId = " << it.key() << "-> partIdRef VORHERXX" << toString(it.value());
|
||||
}
|
||||
|
||||
for (const auto &area : qAsConst(objMap))
|
||||
for (const auto &area : std::as_const(objMap))
|
||||
{
|
||||
if (area)
|
||||
updateInternal_participantPerArea(*area, posData);
|
||||
@@ -537,7 +538,7 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
|
||||
// Note: m_participantsPerArea is up-to-date
|
||||
QSet<int> areasWithPart = areasWithParticipant(changedParticipantId);
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " areasWithPart=" << areasWithPart.size();
|
||||
for (auto curAreaId : qAsConst(areasWithPart))
|
||||
for (auto curAreaId : std::as_const(areasWithPart))
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " -> curAreaId=" << curAreaId;
|
||||
|
||||
if (!idIsRelevantHelper(areasWithPart, areaId))
|
||||
@@ -601,7 +602,7 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
|
||||
if (m_participantsPerArea.contains(areaId))
|
||||
{
|
||||
QSet<int> &partIdRef = m_participantsPerArea[areaId];
|
||||
for (auto participantId : qAsConst(partIdRef))
|
||||
for (auto participantId : std::as_const(partIdRef))
|
||||
{
|
||||
// check lineOfSight:
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " check lineOfSight for: assignmentId=" << assignmentId
|
||||
@@ -681,7 +682,7 @@ void ShootbackController::syncExternal()
|
||||
std::vector<int32_t> visiPartPerTargetStd;
|
||||
visiPartPerTargetStd.reserve(visiPartPerTarget.size());
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " targetId " << target->getId() << ", visiPartPerTarget = " << toString(visiPartPerTarget);
|
||||
for (auto id : qAsConst(visiPartPerTarget))
|
||||
for (auto id : std::as_const(visiPartPerTarget))
|
||||
visiPartPerTargetStd.push_back(id);
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user