From b3d8778a52576b66ab00b08aa939612136a49a01 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 17 Sep 2014 11:51:51 -0500 Subject: fix flint++ warnings --- include/datetime/actions-live.h | 24 ++++++++++++------------ include/datetime/actions.h | 2 +- include/datetime/clock-mock.h | 2 +- include/datetime/dbus-shared.h | 6 +++--- include/datetime/engine-eds.h | 6 +++--- include/datetime/engine-mock.h | 6 +++--- include/datetime/engine.h | 6 +++--- include/datetime/exporter.h | 2 +- include/datetime/formatter.h | 4 ++-- include/datetime/planner-range.h | 2 +- include/datetime/wakeup-timer-mainloop.h | 2 +- include/datetime/wakeup-timer-powerd.h | 2 +- 12 files changed, 32 insertions(+), 32 deletions(-) (limited to 'include/datetime') diff --git a/include/datetime/actions-live.h b/include/datetime/actions-live.h index 0bf48a8..0214d65 100644 --- a/include/datetime/actions-live.h +++ b/include/datetime/actions-live.h @@ -36,21 +36,21 @@ namespace datetime { class LiveActions: public Actions { public: - LiveActions(const std::shared_ptr& state_in); - ~LiveActions() =default; + explicit LiveActions(const std::shared_ptr& state_in); + virtual ~LiveActions() =default; - bool desktop_has_calendar_app() const; - void desktop_open_alarm_app(); - void desktop_open_appointment(const Appointment&); - void desktop_open_calendar_app(const DateTime&); - void desktop_open_settings_app(); + bool desktop_has_calendar_app() const override; + void desktop_open_alarm_app() override; + void desktop_open_appointment(const Appointment&) override; + void desktop_open_calendar_app(const DateTime&) override; + void desktop_open_settings_app() override; - void phone_open_alarm_app(); - void phone_open_appointment(const Appointment&); - void phone_open_calendar_app(const DateTime&); - void phone_open_settings_app(); + void phone_open_alarm_app() override; + void phone_open_appointment(const Appointment&) override; + void phone_open_calendar_app(const DateTime&) override; + void phone_open_settings_app() override; - void set_location(const std::string& zone, const std::string& name); + void set_location(const std::string& zone, const std::string& name) override; protected: virtual void execute_command(const std::string& command); diff --git a/include/datetime/actions.h b/include/datetime/actions.h index f59ef67..87cb676 100644 --- a/include/datetime/actions.h +++ b/include/datetime/actions.h @@ -61,7 +61,7 @@ public: const std::shared_ptr state() const; protected: - Actions(const std::shared_ptr& state); + explicit Actions(const std::shared_ptr& state); virtual ~Actions(); private: diff --git a/include/datetime/clock-mock.h b/include/datetime/clock-mock.h index 0e24377..84fd860 100644 --- a/include/datetime/clock-mock.h +++ b/include/datetime/clock-mock.h @@ -36,7 +36,7 @@ namespace datetime { class MockClock: public Clock { public: - MockClock(const DateTime& dt): m_localtime(dt) {} + explicit MockClock(const DateTime& dt): m_localtime(dt) {} ~MockClock() =default; DateTime localtime() const { return m_localtime; } diff --git a/include/datetime/dbus-shared.h b/include/datetime/dbus-shared.h index c09caa2..0c6b4be 100644 --- a/include/datetime/dbus-shared.h +++ b/include/datetime/dbus-shared.h @@ -18,8 +18,8 @@ * Charles Kerr */ -#ifndef _INDICATOR_DATETIME_DBUS_SHARED_H_ -#define _INDICATOR_DATETIME_DBUS_SHARED_H_ +#ifndef INDICATOR_DATETIME_DBUS_SHARED_H +#define INDICATOR_DATETIME_DBUS_SHARED_H #define BUS_DATETIME_NAME "com.canonical.indicator.datetime" #define BUS_DATETIME_PATH "/com/canonical/indicator/datetime" @@ -29,4 +29,4 @@ #define BUS_POWERD_INTERFACE "com.canonical.powerd" -#endif /* _INDICATOR_DATETIME_DBUS_SHARED_H_ */ +#endif /* INDICATOR_DATETIME_DBUS_SHARED_H */ diff --git a/include/datetime/engine-eds.h b/include/datetime/engine-eds.h index 4b260a8..ebee838 100644 --- a/include/datetime/engine-eds.h +++ b/include/datetime/engine-eds.h @@ -17,8 +17,8 @@ * Charles Kerr */ -#ifndef INDICATOR_DATETIME_ENGINE_EDS__H -#define INDICATOR_DATETIME_ENGINE_EDS__H +#ifndef INDICATOR_DATETIME_ENGINE_EDS_H +#define INDICATOR_DATETIME_ENGINE_EDS_H #include @@ -72,4 +72,4 @@ private: } // namespace indicator } // namespace unity -#endif // INDICATOR_DATETIME_ENGINE_EDS__H +#endif // INDICATOR_DATETIME_ENGINE_EDS_H diff --git a/include/datetime/engine-mock.h b/include/datetime/engine-mock.h index ecbf102..4b25120 100644 --- a/include/datetime/engine-mock.h +++ b/include/datetime/engine-mock.h @@ -17,8 +17,8 @@ * Charles Kerr */ -#ifndef INDICATOR_DATETIME_ENGINE_MOCK__H -#define INDICATOR_DATETIME_ENGINE_MOCK__H +#ifndef INDICATOR_DATETIME_ENGINE_MOCK_H +#define INDICATOR_DATETIME_ENGINE_MOCK_H #include @@ -65,4 +65,4 @@ private: } // namespace indicator } // namespace unity -#endif // INDICATOR_DATETIME_ENGINE_NOOP__H +#endif // INDICATOR_DATETIME_ENGINE_MOCK_H diff --git a/include/datetime/engine.h b/include/datetime/engine.h index 2e8237e..56e9343 100644 --- a/include/datetime/engine.h +++ b/include/datetime/engine.h @@ -17,8 +17,8 @@ * Charles Kerr */ -#ifndef INDICATOR_DATETIME_ENGINE__H -#define INDICATOR_DATETIME_ENGINE__H +#ifndef INDICATOR_DATETIME_ENGINE_H +#define INDICATOR_DATETIME_ENGINE_H #include #include @@ -65,4 +65,4 @@ protected: } // namespace indicator } // namespace unity -#endif // INDICATOR_DATETIME_ENGINE__H +#endif // INDICATOR_DATETIME_ENGINE_H diff --git a/include/datetime/exporter.h b/include/datetime/exporter.h index dd57263..211e7bb 100644 --- a/include/datetime/exporter.h +++ b/include/datetime/exporter.h @@ -39,7 +39,7 @@ namespace datetime { class Exporter { public: - Exporter(const std::shared_ptr&); + explicit Exporter(const std::shared_ptr&); ~Exporter(); core::Signal<>& name_lost(); diff --git a/include/datetime/formatter.h b/include/datetime/formatter.h index 0d695e2..9b3699d 100644 --- a/include/datetime/formatter.h +++ b/include/datetime/formatter.h @@ -86,7 +86,7 @@ public: std::string relative_format(GDateTime* then, GDateTime* then_end=nullptr) const; protected: - Formatter(const std::shared_ptr&); + explicit Formatter(const std::shared_ptr&); virtual ~Formatter(); static const char* default_header_time_format(bool twelvehour, bool show_seconds); @@ -126,7 +126,7 @@ private: class PhoneFormatter: public Formatter { public: - PhoneFormatter(const std::shared_ptr& clock): Formatter(clock) { + explicit PhoneFormatter(const std::shared_ptr& clock): Formatter(clock) { header_format.set(default_header_time_format(is_locale_12h(), false)); } }; diff --git a/include/datetime/planner-range.h b/include/datetime/planner-range.h index 2ee2fa0..d638182 100644 --- a/include/datetime/planner-range.h +++ b/include/datetime/planner-range.h @@ -72,7 +72,7 @@ private: core::Property> m_appointments; // we've got a GSignal tag here, so disable copying - SimpleRangePlanner(const RangePlanner&) =delete; + explicit SimpleRangePlanner(const RangePlanner&) =delete; SimpleRangePlanner& operator=(const RangePlanner&) =delete; }; diff --git a/include/datetime/wakeup-timer-mainloop.h b/include/datetime/wakeup-timer-mainloop.h index 480d728..86da8cf 100644 --- a/include/datetime/wakeup-timer-mainloop.h +++ b/include/datetime/wakeup-timer-mainloop.h @@ -39,7 +39,7 @@ namespace datetime { class MainloopWakeupTimer: public WakeupTimer { public: - MainloopWakeupTimer(const std::shared_ptr&); + explicit MainloopWakeupTimer(const std::shared_ptr&); ~MainloopWakeupTimer(); void set_wakeup_time (const DateTime&); core::Signal<>& timeout(); diff --git a/include/datetime/wakeup-timer-powerd.h b/include/datetime/wakeup-timer-powerd.h index 6adbbb8..f11febe 100644 --- a/include/datetime/wakeup-timer-powerd.h +++ b/include/datetime/wakeup-timer-powerd.h @@ -39,7 +39,7 @@ namespace datetime { class PowerdWakeupTimer: public WakeupTimer { public: - PowerdWakeupTimer(const std::shared_ptr&); + explicit PowerdWakeupTimer(const std::shared_ptr&); ~PowerdWakeupTimer(); void set_wakeup_time(const DateTime&); core::Signal<>& timeout(); -- cgit v1.2.3