From 5e05830765bdcae09db297918d3aa0620371ccf3 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 6 Oct 2014 14:54:15 -0500 Subject: fix warnings reported by flint++ -- explicit ctors, classes with virtual methods but no virtual dtor, #ifdef include guards --- src/exporter.h | 6 +++++- src/indicator.h | 1 + tests/glib-fixture.h | 9 +++++++++ tests/gtestdbus-fixture.h | 10 ++++++++-- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/exporter.h b/src/exporter.h index 6367f3a..8867d32 100644 --- a/src/exporter.h +++ b/src/exporter.h @@ -17,6 +17,9 @@ * Charles Kerr */ +#ifndef INDICATOR_DISPLAY_EXPORTER_H +#define INDICATOR_DISPLAY_EXPORTER_H + #include #include @@ -26,7 +29,7 @@ class Exporter { public: - Exporter(const std::shared_ptr& indicator); + explicit Exporter(const std::shared_ptr& indicator); ~Exporter(); core::Signal& name_lost(); @@ -38,3 +41,4 @@ private: Exporter& operator=(const Exporter&) =delete; }; +#endif /* INDICATOR_DISPLAY_EXPORTER_H */ diff --git a/src/indicator.h b/src/indicator.h index dc4df09..d0834fd 100644 --- a/src/indicator.h +++ b/src/indicator.h @@ -52,6 +52,7 @@ public: virtual std::string name() const =0; virtual const core::Property
& header() const =0; virtual std::shared_ptr menu_model() const =0; + virtual ~Profile() =default; protected: Profile() =default; diff --git a/tests/glib-fixture.h b/tests/glib-fixture.h index a8f3a76..d60a038 100644 --- a/tests/glib-fixture.h +++ b/tests/glib-fixture.h @@ -17,6 +17,9 @@ * Charles Kerr */ +#ifndef INDICATOR_TESTS_GLIB_FIXTURE_H +#define INDICATOR_TESTS_GLIB_FIXTURE_H + #include #include @@ -140,4 +143,10 @@ class GlibFixture : public ::testing::Test } GMainLoop * loop; + + public: + + virtual ~GLibFixture() =default; }; + +#endif /* INDICATOR_TESTS_GLIB_FIXTURE_H */ diff --git a/tests/gtestdbus-fixture.h b/tests/gtestdbus-fixture.h index 541050e..c592033 100644 --- a/tests/gtestdbus-fixture.h +++ b/tests/gtestdbus-fixture.h @@ -17,6 +17,9 @@ * Charles Kerr */ +#ifndef INDICATOR_TESTS_GTESTDBUS_FIXTURE_H +#define INDICATOR_TESTS_GTESTDBUS_FIXTURE_H + #include "glib-fixture.h" /*** @@ -27,9 +30,10 @@ class GTestDBusFixture: public GlibFixture { public: - GTestDBusFixture() {} + GTestDBusFixture() =default; + virtual ~GTestDBusFixture() =default; - GTestDBusFixture(const std::vector& service_dirs_in): service_dirs(service_dirs_in) {} + explicit GTestDBusFixture(const std::vector& service_dirs_in): service_dirs(service_dirs_in) {} private: @@ -100,3 +104,5 @@ class GTestDBusFixture: public GlibFixture super::TearDown(); } }; + +#endif /* INDICATOR_TESTS_GTESTDBUS_FIXTURE_H */ -- cgit v1.2.3