From cc2ad2ad457313cb87e4483bf0278f670a5a5cea Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 30 Jan 2014 13:00:22 -0600 Subject: as per review, don't inline unless there are performance issues --- include/datetime/actions-live.h | 2 +- include/datetime/appointment.h | 12 +----------- include/datetime/date-time.h | 6 +++--- include/datetime/locations.h | 12 ++---------- include/datetime/menu.h | 2 +- include/datetime/timezone-file.h | 6 +++--- include/datetime/timezone.h | 1 - 7 files changed, 11 insertions(+), 30 deletions(-) (limited to 'include') diff --git a/include/datetime/actions-live.h b/include/datetime/actions-live.h index 949222d..3607836 100644 --- a/include/datetime/actions-live.h +++ b/include/datetime/actions-live.h @@ -36,7 +36,7 @@ namespace datetime { class LiveActions: public Actions { public: - LiveActions(const std::shared_ptr& state_in): Actions(state_in) {} + LiveActions(const std::shared_ptr& state_in); ~LiveActions() =default; void open_desktop_settings(); diff --git a/include/datetime/appointment.h b/include/datetime/appointment.h index e034c08..a5283c9 100644 --- a/include/datetime/appointment.h +++ b/include/datetime/appointment.h @@ -45,17 +45,7 @@ public: DateTime begin; DateTime end; - bool operator== (const Appointment& that) const - { - return (color==that.color) && - (summary==that.summary) && - (url==that.url) && - (uid==that.uid) && - (is_event==that.is_event) && - (has_alarms==that.has_alarms) && - (begin==that.begin) && - (end==that.end); - } + bool operator== (const Appointment& that) const; }; } // namespace datetime diff --git a/include/datetime/date-time.h b/include/datetime/date-time.h index c2429eb..2ad7856 100644 --- a/include/datetime/date-time.h +++ b/include/datetime/date-time.h @@ -37,9 +37,9 @@ class DateTime public: static DateTime NowLocal(); explicit DateTime(time_t t); - explicit DateTime(GDateTime* in=nullptr) {reset(in);} - DateTime& operator=(GDateTime* in) {reset(in); return *this;} - DateTime& operator=(const DateTime& in) {m_dt=in.m_dt; return *this; } + explicit DateTime(GDateTime* in=nullptr); + DateTime& operator=(GDateTime* in); + DateTime& operator=(const DateTime& in); DateTime to_timezone(const std::string& zone) const; void reset(GDateTime* in=nullptr); diff --git a/include/datetime/locations.h b/include/datetime/locations.h index fc776bb..b840436 100644 --- a/include/datetime/locations.h +++ b/include/datetime/locations.h @@ -39,18 +39,10 @@ namespace datetime { class Location { public: + Location (const std::string& zone, const std::string& name); const std::string& zone() const; - const std::string& name() const; - - bool operator== (const Location& that) const - { - return (name() == that.name()) && - (zone() == that.zone()) && - (m_offset == that.m_offset); - } - - Location (const std::string& zone, const std::string& name); + bool operator== (const Location& that) const; private: diff --git a/include/datetime/menu.h b/include/datetime/menu.h index f097b02..526cd9f 100644 --- a/include/datetime/menu.h +++ b/include/datetime/menu.h @@ -48,7 +48,7 @@ public: GMenuModel* menu_model(); protected: - Menu (Profile profile_in, const std::string& name_in): m_profile(profile_in), m_name(name_in) {} + Menu (Profile profile_in, const std::string& name_in); virtual ~Menu() =default; GMenu* m_menu = nullptr; diff --git a/include/datetime/timezone-file.h b/include/datetime/timezone-file.h index 7f47df6..d77aaae 100644 --- a/include/datetime/timezone-file.h +++ b/include/datetime/timezone-file.h @@ -37,9 +37,9 @@ namespace datetime { class FileTimezone: public Timezone { public: - FileTimezone() {} - FileTimezone(const std::string& filename) { setFilename(filename); } - ~FileTimezone() {clear();} + FileTimezone(); + FileTimezone(const std::string& filename); + ~FileTimezone(); private: void setFilename(const std::string& filename); diff --git a/include/datetime/timezone.h b/include/datetime/timezone.h index ffa5a84..7d2ace8 100644 --- a/include/datetime/timezone.h +++ b/include/datetime/timezone.h @@ -35,7 +35,6 @@ protected: Timezone() =default; public: - //virtual ~Timezone() {} core::Property timezone; }; -- cgit v1.2.3