Use reference whenever possible

This commit is contained in:
Chocobo1
2023-05-05 02:50:19 +08:00
parent 5b43782f58
commit 8c9b6e2f2d
12 changed files with 13 additions and 13 deletions

View File

@@ -382,13 +382,13 @@ void AutoDownloader::handleFeedURLChanged(Feed *feed, const QString &oldURL)
}
}
for (QSharedPointer<ProcessingJob> job : asConst(m_processingQueue))
for (const QSharedPointer<ProcessingJob> &job : asConst(m_processingQueue))
{
if (job->feedURL == oldURL)
job->feedURL = feed->url();
}
for (QSharedPointer<ProcessingJob> job : asConst(m_waitingJobs))
for (const QSharedPointer<ProcessingJob> &job : asConst(m_waitingJobs))
{
if (job->feedURL == oldURL)
job->feedURL = feed->url();

View File

@@ -541,7 +541,7 @@ namespace
const int PARSINGRESULT_TYPEID = qRegisterMetaType<RSS::Private::ParsingResult>();
RSS::Private::Parser::Parser(const QString lastBuildDate)
RSS::Private::Parser::Parser(const QString &lastBuildDate)
{
m_result.lastBuildDate = lastBuildDate;
}

View File

@@ -53,7 +53,7 @@ namespace RSS::Private
Q_DISABLE_COPY_MOVE(Parser)
public:
explicit Parser(QString lastBuildDate);
explicit Parser(const QString &lastBuildDate);
void parse(const QByteArray &feedData);
signals: