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 "cnr_handler.h"
#include <utility>
#include "avm_dts.h"
#include "dds_handler.h"
#include "exercise_context.h"
@@ -235,7 +236,7 @@ bool CnrHandler::init()
return false;
}
for (const AvmCnrChannel &currentChannel : qAsConst(m_channels))
for (const AvmCnrChannel &currentChannel : std::as_const(m_channels))
m_dts->publish(::AudioVideoManagement::toDds(currentChannel));
// Don't use select with callback here as addConfig() uses the DB, too.
@@ -246,7 +247,7 @@ bool CnrHandler::init()
return false;
}
for (const AvmCnrConfig &currentConfig : qAsConst(cnrConfigs))
for (const AvmCnrConfig &currentConfig : std::as_const(cnrConfigs))
{
auto reply = createCnrConfig(toRequest(currentConfig, 0), currentConfig.id);
if (reply.error())
@@ -399,7 +400,7 @@ void CnrHandler::updateDeviceConfig()
{
DBTransaction trans(m_db->database());
for (const auto &config : qAsConst(m_cache))
for (const auto &config : std::as_const(m_cache))
if (config.isActive)
m_deviceConfig->update(config);
@@ -481,7 +482,7 @@ Core::FunctionReplyObject CnrHandler::validateRequest(const ModifyCnrConfigReque
*/
bool CnrHandler::checkConstraint(const std::function<bool (const CnrConfig &)> &constraint, const boost::optional<int> &exerciseId, const boost::optional<int32_t> &excludeId) const
{
for (const CnrConfig &config : qAsConst(m_cache))
for (const CnrConfig &config : std::as_const(m_cache))
{
if (excludeId == config.id)
continue;
@@ -707,7 +708,7 @@ QString CnrHandler::exerciseList(const CnrConfig &config) const
// Global - all active exercises, no matter if they have active plannings or not
QStringList exerciseList;
for (const auto &context : qAsConst(m_activeExercises->allContexts()))
for (const auto &context : std::as_const(m_activeExercises->allContexts()))
exerciseList.append(context.toString());
return exerciseList.join(QLatin1Char(','));
}
@@ -744,7 +745,7 @@ int CnrHandler::normalizedAddacChannel(int addacChannel) const
Database::AvmCnrChannel CnrHandler::channelById(int32_t id) const
{
for (const Database::AvmCnrChannel &channel : qAsConst(m_channels))
for (const Database::AvmCnrChannel &channel : std::as_const(m_channels))
if (channel.id == id)
return channel;