fix(clang-tidy): performance-for-range-copy (#6275)

This commit is contained in:
pajlada
2025-06-16 00:20:38 +02:00
committed by GitHub
parent 85863f52df
commit 3391826146
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ void MessageThread::addToThread(const std::weak_ptr<const Message> &message)
size_t MessageThread::liveCount() const
{
size_t count = 0;
for (auto reply : this->replies_)
for (const auto &reply : this->replies_)
{
if (!reply.expired())
{
@@ -55,7 +55,7 @@ size_t MessageThread::liveCount(
const std::shared_ptr<const Message> &exclude) const
{
size_t count = 0;
for (auto reply : this->replies_)
for (const auto &reply : this->replies_)
{
if (!reply.expired() && reply.lock() != exclude)
{
+1 -1
View File
@@ -110,7 +110,7 @@ CommandPage::CommandPage()
QObject::connect(button, &QPushButton::clicked, this, [] {
QFile c1settings(c1settingsPath());
c1settings.open(QIODevice::ReadOnly);
for (auto line :
for (const auto &line :
QString(c1settings.readAll())
.split(QRegularExpression("[\r\n]"), Qt::SkipEmptyParts))
{