Browse Source

Avoid iterating over a temporary variable

adaptive-webui-19844
Chocobo1 3 years ago
parent
commit
0e1849346b
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 3
      src/gui/categoryfiltermodel.cpp

3
src/gui/categoryfiltermodel.cpp

@ -412,7 +412,8 @@ void CategoryFilterModel::populate() @@ -412,7 +412,8 @@ void CategoryFilterModel::populate()
, [](Torrent *torrent) { return torrent->category().isEmpty(); })));
using Torrent = BitTorrent::Torrent;
for (auto i = session->categories().cbegin(); i != session->categories().cend(); ++i)
const QStringMap categories = session->categories();
for (auto i = categories.cbegin(); i != categories.cend(); ++i)
{
const QString &category = i.key();
if (m_isSubcategoriesEnabled)

Loading…
Cancel
Save