Avoid iterating over a temporary variable

This commit is contained in:
Chocobo1 2021-11-28 20:34:14 +08:00
parent 0f34e3bed9
commit 0e1849346b
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -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)