fix(clang-tidy): performance-for-range-copy (#6275)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user