mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Slight code optimization
This commit is contained in:
parent
318a959470
commit
73c312ec1a
@ -113,7 +113,7 @@ public:
|
||||
|
||||
QStringList enginesEnabled() const {
|
||||
QStringList engines;
|
||||
foreach(SupportedEngine *engine, values()) {
|
||||
foreach(const SupportedEngine *engine, values()) {
|
||||
if(engine->isEnabled())
|
||||
engines << engine->getName();
|
||||
}
|
||||
@ -122,9 +122,9 @@ public:
|
||||
|
||||
QStringList supportedCategories() const {
|
||||
QStringList supported_cat;
|
||||
foreach(SupportedEngine *engine, values()) {
|
||||
foreach(const SupportedEngine *engine, values()) {
|
||||
if(engine->isEnabled()) {
|
||||
QStringList s = engine->getSupportedCategories();
|
||||
const QStringList &s = engine->getSupportedCategories();
|
||||
foreach(QString cat, s) {
|
||||
cat = cat.trimmed();
|
||||
if(!cat.isEmpty() && !supported_cat.contains(cat))
|
||||
|
Loading…
Reference in New Issue
Block a user