From b55403ce665472dc00f52337df80e2ede3be478f Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 10 Nov 2019 02:58:14 +0800 Subject: [PATCH] Pass TriStateBool by value --- src/base/rss/rss_autodownloadrule.cpp | 8 ++++---- src/base/rss/rss_autodownloadrule.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/base/rss/rss_autodownloadrule.cpp b/src/base/rss/rss_autodownloadrule.cpp index fda77ce85..7bc18108d 100644 --- a/src/base/rss/rss_autodownloadrule.cpp +++ b/src/base/rss/rss_autodownloadrule.cpp @@ -62,7 +62,7 @@ namespace return TriStateBool::Undefined; } - QJsonValue triStateBoolToJsonValue(const TriStateBool &triStateBool) + QJsonValue triStateBoolToJsonValue(const TriStateBool triStateBool) { switch (static_cast(triStateBool)) { case 0: return false; @@ -80,7 +80,7 @@ namespace } } - int triStateBoolToAddPausedLegacy(const TriStateBool &triStateBool) + int triStateBoolToAddPausedLegacy(const TriStateBool triStateBool) { switch (static_cast(triStateBool)) { case 0: return 2; // never @@ -584,7 +584,7 @@ TriStateBool AutoDownloadRule::addPaused() const return m_dataPtr->addPaused; } -void AutoDownloadRule::setAddPaused(const TriStateBool &addPaused) +void AutoDownloadRule::setAddPaused(const TriStateBool addPaused) { m_dataPtr->addPaused = addPaused; } @@ -594,7 +594,7 @@ TriStateBool AutoDownloadRule::createSubfolder() const return m_dataPtr->createSubfolder; } -void AutoDownloadRule::setCreateSubfolder(const TriStateBool &createSubfolder) +void AutoDownloadRule::setCreateSubfolder(const TriStateBool createSubfolder) { m_dataPtr->createSubfolder = createSubfolder; } diff --git a/src/base/rss/rss_autodownloadrule.h b/src/base/rss/rss_autodownloadrule.h index 4c4604b6e..2ab2746e1 100644 --- a/src/base/rss/rss_autodownloadrule.h +++ b/src/base/rss/rss_autodownloadrule.h @@ -78,9 +78,9 @@ namespace RSS QString savePath() const; void setSavePath(const QString &savePath); TriStateBool addPaused() const; - void setAddPaused(const TriStateBool &addPaused); + void setAddPaused(TriStateBool addPaused); TriStateBool createSubfolder() const; - void setCreateSubfolder(const TriStateBool &createSubfolder); + void setCreateSubfolder(TriStateBool createSubfolder); QString assignedCategory() const; void setCategory(const QString &category);