Merge pull request #3180 from ngosang/cppcheck_fixes_32x

Cppcheck: scope reduction & unused variables (v3_2_x)
This commit is contained in:
sledgehammer999
2015-06-13 20:19:40 +03:00
4 changed files with 12 additions and 17 deletions

View File

@@ -117,7 +117,6 @@ void RssFeed::loadItemsFromDisk()
}
void RssFeed::addArticle(const RssArticlePtr& article) {
int lbIndex = -1;
int max_articles = Preferences::instance()->getRSSMaxArticlesPerFeed();
if (!m_articles.contains(article->guid())) {
@@ -131,7 +130,7 @@ void RssFeed::addArticle(const RssArticlePtr& article) {
// Insertion sort
RssArticleList::Iterator lowerBound = qLowerBound(m_articlesByDate.begin(), m_articlesByDate.end(), article, rssArticleDateRecentThan);
m_articlesByDate.insert(lowerBound, article);
lbIndex = m_articlesByDate.indexOf(article);
int lbIndex = m_articlesByDate.indexOf(article);
if (m_articlesByDate.size() > max_articles) {
RssArticlePtr oldestArticle = m_articlesByDate.takeLast();
m_articles.remove(oldestArticle->guid());