[pan: 18/22] Merge branch 'clang-check-2' into cppcheck
- From: Dominique Dumont <ddumont src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan: 18/22] Merge branch 'clang-check-2' into cppcheck
- Date: Sun, 18 Sep 2022 16:35:38 +0000 (UTC)
commit c888860e5e220f99bfdc62b7253b846bcf0f1ceb
Merge: d99e866 e1a47b0
Author: Thomas Tanner <thosrtanner googlemail com>
Date: Mon Jul 18 20:18:24 2022 +0100
Merge branch 'clang-check-2' into cppcheck
# Conflicts:
# .gitignore
# pan/data-impl/data-impl.h
# pan/gui/dl-headers-ui.cc
# pan/gui/log-ui.cc
# pan/gui/server-ui.cc
# pan/tasks/decoder.cc
.gitignore | 3 +
pan/data-impl/data-impl.cc | 2 +
pan/data-impl/data-impl.h | 224 +++++++++++++++++++++---------------------
pan/data-impl/data-io.cc | 2 +
pan/general/Makefile.am | 1 +
pan/general/file-util.cc | 2 +-
pan/general/null.h | 32 ++++++
pan/general/string-view.h | 2 +-
pan/gui/body-pane.cc | 2 +
pan/gui/dl-headers-ui.cc | 2 +
pan/gui/group-pane.cc | 2 +
pan/gui/group-pane.h | 8 +-
pan/gui/group-prefs-dialog.cc | 2 +
pan/gui/gui.cc | 2 +
pan/gui/header-pane.cc | 2 +
pan/gui/log-ui.cc | 2 +
pan/gui/pan-file-entry.cc | 2 +
pan/gui/pan.cc | 30 +++---
pan/gui/post-ui.cc | 2 +
pan/gui/prefs-ui.cc | 2 +
pan/gui/profiles-dialog.cc | 2 +
pan/gui/save-attach-ui.cc | 2 +
pan/gui/save-ui.cc | 2 +
pan/gui/score-add-ui.cc | 2 +
pan/gui/score-view-ui.cc | 2 +
pan/gui/server-ui.cc | 2 +
pan/gui/task-pane.cc | 2 +
pan/tasks/decoder.cc | 2 +
28 files changed, 209 insertions(+), 133 deletions(-)
---
diff --cc .gitignore
index 1cf4241,eab73d1..9500b51
--- a/.gitignore
+++ b/.gitignore
@@@ -53,4 -53,6 +53,7 @@@ stamp-h
Thumbs.db
.waf*/
waf*/
+cppcheck-*.log.txt
+ *.gcov
+ *.gcda
+ *.gcno
diff --cc pan/data-impl/data-impl.h
index 63a48db,cea8942..718a974
--- a/pan/data-impl/data-impl.h
+++ b/pan/data-impl/data-impl.h
@@@ -78,17 -78,17 +78,17 @@@ namespace pa
/* The ProfilesImpl will own and destruct the DataIO object */
DataImpl (const StringView& cache_ext, Prefs& prefs, bool unit_test=false, int cache_megs=10, DataIO
* source=new DataIO());
virtual ~DataImpl ();
- void save_state () override;
+ void save_state() override final;
public:
- virtual ArticleCache& get_cache () { return _cache; }
- virtual const ArticleCache& get_cache () const { return _cache; }
+ ArticleCache& get_cache () override { return _cache; }
+ const ArticleCache& get_cache () const override { return _cache; }
- virtual EncodeCache& get_encode_cache () { return _encode_cache; }
- virtual const EncodeCache& get_encode_cache () const { return _encode_cache; }
+ EncodeCache& get_encode_cache () override { return _encode_cache; }
+ const EncodeCache& get_encode_cache () const override { return _encode_cache; }
- virtual CertStore& get_certstore () { return _certstore; }
- virtual const CertStore& get_certstore () const { return _certstore; }
+ CertStore& get_certstore () override { return _certstore; }
+ const CertStore& get_certstore () const override { return _certstore; }
virtual Prefs& get_prefs () { return _prefs; }
virtual const Prefs& get_prefs () const { return _prefs; }
@@@ -484,14 -484,14 +484,14 @@@
virtual ~MyTree ();
public: // from ArticleTree
- virtual void get_children (const Quark& mid, articles_t& setme) const;
- virtual const Article* get_parent (const Quark& mid) const;
- virtual const Article* get_article (const Quark& mid) const;
- virtual size_t size () const;
+ void get_children (const Quark& mid, articles_t& setme) const override;
+ const Article* get_parent (const Quark& mid) const override;
+ const Article* get_article (const Quark& mid) const override;
+ size_t size () const override;
void set_filter (const ShowType show_type = SHOW_ARTICLES,
- const FilterInfo * criteria = 0) override;
+ const FilterInfo * criteria = 0) final override;
void set_rules (const ShowType show_type = SHOW_ARTICLES,
- const RulesInfo * rules = 0) override;
+ const RulesInfo * rules = 0) final override;
public:
void articles_changed (const quarks_t& mids, bool do_refilter);
diff --cc pan/gui/dl-headers-ui.cc
index 0cb381b,9e8955d..b7de60b
--- a/pan/gui/dl-headers-ui.cc
+++ b/pan/gui/dl-headers-ui.cc
@@@ -26,9 -24,12 +26,11 @@@
#include <pan/general/macros.h>
#include <pan/tasks/queue.h>
#include <pan/tasks/task-xover.h>
-#include "dl-headers-ui.h"
#include "pad.h"
+ #include <pan/general/null.h>
+
-using namespace pan;
+namespace pan {
namespace
{
diff --cc pan/gui/log-ui.cc
index 395a201,760e88a..b05a90b
--- a/pan/gui/log-ui.cc
+++ b/pan/gui/log-ui.cc
@@@ -28,9 -26,12 +28,11 @@@
#include <pan/general/log.h>
#include <pan/general/macros.h>
#include <pan/general/string-view.h>
-#include "log-ui.h"
#include "pad.h"
+ #include <pan/general/null.h>
+
-using namespace pan;
+namespace pan {
namespace
{
diff --cc pan/gui/server-ui.cc
index d0387e6,261fae8..3f2b6ee
--- a/pan/gui/server-ui.cc
+++ b/pan/gui/server-ui.cc
@@@ -51,7 -50,9 +51,9 @@@
#endif /* GTK_CHECK_VERSION(3,0,0) */
#endif
+ #include <pan/general/null.h>
+
-using namespace pan;
+namespace pan {
/************
************* EDIT DIALOG
diff --cc pan/tasks/decoder.cc
index 2cf9f16,848a0cb..9920df3
--- a/pan/tasks/decoder.cc
+++ b/pan/tasks/decoder.cc
@@@ -35,16 -33,13 +35,18 @@@
#include <pan/general/file-util.h>
#include <pan/general/macros.h>
#include <pan/general/utf8-utils.h>
-#include "decoder.h"
+ #include <pan/general/null.h>
+
-using namespace pan;
+namespace pan {
Decoder :: Decoder (WorkerPool& pool):
+ mark_read(false),
+ task(nullptr),
+ save_mode(TaskArticle::NONE),
+ options(TaskArticle::SAVE_AS),
+ percent(0.0),
+ num_scanned_files(0),
health(OK),
_worker_pool (pool),
_gsourceid (-1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]