fix Warning

This commit is contained in:
berrux-dev committed 2026-10-03 09:20:13 +02:00
1 parent 593c221d23
commit 8345470273
316 files changed
+1246 -929

No files matched your search

@@ -8,6 +8,7 @@
*/
#include "tvc_handler.h"
#include <utility>
#include "dds_handler.h"
#include "exercise_context.h"
#include "active_exercises.h"
@@ -201,7 +202,7 @@ bool TvcHandler::init()
return false;
}
for (const AvmTvcChannel &currentChannel : qAsConst(m_channels))
for (const AvmTvcChannel &currentChannel : std::as_const(m_channels))
m_dts->publish(toDds(currentChannel));
QVector<AvmTvcConfig> tvcConfigs;
@@ -212,7 +213,7 @@ bool TvcHandler::init()
return false;
}
for (const AvmTvcConfig &currentConfig : qAsConst(tvcConfigs))
for (const AvmTvcConfig &currentConfig : std::as_const(tvcConfigs))
createTvcConfig(toRequest(currentConfig, 0), currentConfig.id);
return true;
@@ -412,7 +413,7 @@ Database::AvmDeviceConfig TvcHandler::toDeviceConfig(const TvcConfig &tvcConfig)
Database::AvmTvcChannel TvcHandler::channelById(int32_t id) const
{
for (const Database::AvmTvcChannel &channel : qAsConst(m_channels))
for (const Database::AvmTvcChannel &channel : std::as_const(m_channels))
if (channel.id == id)
return channel;
@@ -424,7 +425,7 @@ void TvcHandler::onContextActivated(const ExerciseContext &context)
{
bool isFirstActiveExercise = m_activeExercises->count() == 1;
for (const TvcConfig &tvcConfig : qAsConst(m_cache))
for (const TvcConfig &tvcConfig : std::as_const(m_cache))
{
bool isLocal = tvcConfig.exerciseId.is_set();
if (isLocal)
@@ -446,7 +447,7 @@ void TvcHandler::onContextDeactivated(const ExerciseContext &context)
{
bool haveActiveExercise = m_activeExercises->count() > 0;
for (const TvcConfig &tvcConfig : qAsConst(m_cache))
for (const TvcConfig &tvcConfig : std::as_const(m_cache))
{
bool isLocal = tvcConfig.exerciseId.is_set();
@@ -526,7 +527,7 @@ Core::FunctionReplyObject TvcHandler::validateRequest(const ModifyTvcConfigReque
*/
bool TvcHandler::checkConstraint(const std::function<bool (const TvcConfig &)> &constraint, const boost::optional<int> &exerciseId, const boost::optional<int32_t> &excludeId) const
{
for (const TvcConfig &config : qAsConst(m_cache))
for (const TvcConfig &config : std::as_const(m_cache))
{
if (excludeId == config.id)
continue;