Fix issues reported by clang-tidy modernize checks (GTK client) (#4137)

* Fix `modernize-avoid-c-arrays` clang-tidy issues

* Fix `modernize-raw-string-literal` clang-tidy issues

* Fix `modernize-use-nodiscard` clang-tidy issues

* Fix `modernize-deprecated-headers` clang-tidy issues

* Fix `modernize-pass-by-value` clang-tidy issues

* Extend clang-tidy configuration

Enable all `modernize` checks except for one (use-trailing-return-type)
which is an extensive stylistic change for later.
This commit is contained in:
Mike Gelfand
2022-11-10 20:35:31 +01:00
committed by GitHub
parent d61e31c419
commit 92b74fee74
11 changed files with 70 additions and 61 deletions

View File

@@ -3,6 +3,7 @@
// License text can be found in the licenses/ folder.
#include <algorithm>
#include <csignal>
#include <cstdlib> // exit()
#include <ctime>
#include <iterator> // std::back_inserter
@@ -15,9 +16,6 @@
#include <utility>
#include <vector>
#include <locale.h>
#include <signal.h>
#include <fmt/core.h>
#include <giomm.h>
@@ -157,9 +155,9 @@ private:
void on_add_torrent(tr_ctor* ctor);
void on_prefs_changed(tr_quark key);
std::vector<tr_torrent_id_t> get_selected_torrent_ids() const;
tr_torrent* get_first_selected_torrent() const;
counts_data get_selected_torrent_counts() const;
[[nodiscard]] std::vector<tr_torrent_id_t> get_selected_torrent_ids() const;
[[nodiscard]] tr_torrent* get_first_selected_torrent() const;
[[nodiscard]] counts_data get_selected_torrent_counts() const;
void start_all_torrents();
void pause_all_torrents();