fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_exercise.h"
|
||||
#include <utility>
|
||||
#include "exm_db.h"
|
||||
#include "handler_exercise_phase.h"
|
||||
#include "main_handler.h"
|
||||
@@ -70,7 +71,7 @@ bool HandlerExercise::init()
|
||||
QVector<QPair<int, ExerciseState>> exerciseStates;
|
||||
exerciseStates.reserve(dataVec.size());
|
||||
// create exercise objects
|
||||
for (const Database::ExmExercise &data : qAsConst(dataVec))
|
||||
for (const Database::ExmExercise &data : std::as_const(dataVec))
|
||||
{
|
||||
ObjectExercise *ifs(new ObjectExercise(m_ddsHandler, m_db, m_exTblGen, this));
|
||||
Core::FunctionReplyObject ret = ifs->createObject(data);
|
||||
@@ -106,7 +107,7 @@ bool HandlerExercise::init()
|
||||
return a.first < b.first;
|
||||
});
|
||||
|
||||
for (const auto &p : qAsConst(exerciseStates))
|
||||
for (const auto &p : std::as_const(exerciseStates))
|
||||
m_exercisesToStart.enqueue(p.first);
|
||||
m_startupExerciseTimer->start();
|
||||
|
||||
@@ -211,7 +212,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseCreateRequest(const ExerciseC
|
||||
|
||||
int iCnt = 0;
|
||||
QSet<int> linkedExerciseIds;
|
||||
for (const ObjectExercise *ex : qAsConst(m_exeObjMap))
|
||||
for (const ObjectExercise *ex : std::as_const(m_exeObjMap))
|
||||
{
|
||||
const auto state = ex->exerciseState();
|
||||
|
||||
@@ -313,7 +314,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
int iCntRunningExercises = 0;
|
||||
QSet<int> linkedExerciseIds;
|
||||
|
||||
for (const ObjectExercise *ex : qAsConst(m_exeObjMap))
|
||||
for (const ObjectExercise *ex : std::as_const(m_exeObjMap))
|
||||
{
|
||||
const auto state = ex->exerciseState();
|
||||
|
||||
@@ -350,7 +351,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
if (request.newState == ExerciseState::Stopped)
|
||||
{
|
||||
int iCnt = 0;
|
||||
for (const ObjectExercise *ex : qAsConst(m_exeObjMap))
|
||||
for (const ObjectExercise *ex : std::as_const(m_exeObjMap))
|
||||
{
|
||||
const auto state = ex->exerciseState();
|
||||
if (ex->id() != request.id && state == ExerciseState::Stopped)
|
||||
@@ -365,7 +366,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
request.newState == ExerciseState::Paused))
|
||||
{
|
||||
int iCnt = 0;
|
||||
for (const ObjectExercise *ex : qAsConst(m_exeObjMap))
|
||||
for (const ObjectExercise *ex : std::as_const(m_exeObjMap))
|
||||
{
|
||||
if (ex->id() != request.id && ex->data().hasHlaInterface && (ex->exerciseState() == ExerciseState::Started ||
|
||||
ex->exerciseState() == ExerciseState::Paused))
|
||||
@@ -730,7 +731,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar
|
||||
(ifs->exerciseState() == ExerciseState::Paused))
|
||||
{
|
||||
const std::vector<ParticipantManagement::Equipment2ParticipantId> &mapping = equipmentExerciseMapping.mapping;
|
||||
for (const auto &eq2p : qAsConst(mapping))
|
||||
for (const auto &eq2p : std::as_const(mapping))
|
||||
if (eqNoForEx.contains(eq2p.equipmentNumber))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " !!! eq = " << eq2p.equipmentNumber << " is already used in exercise =" << exerciseId;
|
||||
@@ -811,7 +812,7 @@ QStringList HandlerExercise::doubleChannels(int exerciseAId, int exerciseBId) co
|
||||
|
||||
doubleChannelNames.reserve(exerciseAChannelIds.size());
|
||||
|
||||
for (int exerciseAChannelId : qAsConst(exerciseAChannelIds))
|
||||
for (int exerciseAChannelId : std::as_const(exerciseAChannelIds))
|
||||
{
|
||||
if (exerciseBChannelIds.contains(exerciseAChannelId))
|
||||
doubleChannelNames.append(QString::fromStdString(m_ddsHandler->avmDtc()->cnrChannel(exerciseAChannelId).name));
|
||||
|
||||
Reference in new issue
Block a user