diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-10-02 12:04:32 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-10-02 12:04:32 +0900 |
commit | 4623632e14ee9367e5728daf745d5323eb6a51d5 (patch) | |
tree | 4b0b18357e9a546fec25d176d7782c9a44ae9eaf /lib/jobs | |
parent | a2badac44d94294d9404224a55b3193c87cc201d (diff) | |
download | libquotient-4623632e14ee9367e5728daf745d5323eb6a51d5.tar.gz libquotient-4623632e14ee9367e5728daf745d5323eb6a51d5.zip |
BaseJob::Private: experiment with [[nodiscard]]
Diffstat (limited to 'lib/jobs')
-rw-r--r-- | lib/jobs/basejob.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp index 7336fc47..13e65188 100644 --- a/lib/jobs/basejob.cpp +++ b/lib/jobs/basejob.cpp @@ -106,13 +106,13 @@ public: int maxRetries = int(errorStrategy.size()); int retriesTaken = 0; - const JobTimeoutConfig& getCurrentTimeoutConfig() const + [[nodiscard]] const JobTimeoutConfig& getCurrentTimeoutConfig() const { return errorStrategy[std::min(size_t(retriesTaken), errorStrategy.size() - 1)]; } - QString dumpRequest() const + [[nodiscard]] QString dumpRequest() const { // FIXME: use std::array {} when Apple stdlib gets deduction guides for it static const auto verbs = |