diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-01-30 13:44:12 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-01-30 13:44:12 -0600 |
commit | 197309468247c893bdaa37ef47a98db695b2ea78 (patch) | |
tree | e95bd0460940252fc3cc2ff66d88394157e5720f /include/datetime/formatter.h | |
parent | 0f384f4c9607b785d7df4da8566fe2b869ef11e4 (diff) | |
download | ayatana-indicator-datetime-197309468247c893bdaa37ef47a98db695b2ea78.tar.gz ayatana-indicator-datetime-197309468247c893bdaa37ef47a98db695b2ea78.tar.bz2 ayatana-indicator-datetime-197309468247c893bdaa37ef47a98db695b2ea78.zip |
following on the review comment covered in the last commit, use shared_ptr<const X> instead of shared_ptr<X> where possible.
Diffstat (limited to 'include/datetime/formatter.h')
-rw-r--r-- | include/datetime/formatter.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/datetime/formatter.h b/include/datetime/formatter.h index 3de109e..f323858 100644 --- a/include/datetime/formatter.h +++ b/include/datetime/formatter.h @@ -86,7 +86,7 @@ public: std::string getRelativeFormat(GDateTime* then, GDateTime* then_end=nullptr) const; protected: - Formatter(const std::shared_ptr<Clock>&); + Formatter(const std::shared_ptr<const Clock>&); virtual ~Formatter(); static const char* getDefaultHeaderTimeFormat(bool twelvehour, bool show_seconds); @@ -107,10 +107,10 @@ private: class DesktopFormatter: public Formatter { public: - DesktopFormatter(const std::shared_ptr<Clock>&, const std::shared_ptr<Settings>&); + DesktopFormatter(const std::shared_ptr<const Clock>&, const std::shared_ptr<const Settings>&); private: - std::shared_ptr<Settings> m_settings; + std::shared_ptr<const Settings> m_settings; void rebuildHeaderFormat(); const gchar* getFullTimeFormatString() const; @@ -126,7 +126,7 @@ private: class PhoneFormatter: public Formatter { public: - PhoneFormatter(const std::shared_ptr<Clock>& clock): Formatter(clock) { + PhoneFormatter(const std::shared_ptr<const Clock>& clock): Formatter(clock) { headerFormat.set(getDefaultHeaderTimeFormat(is_locale_12h(), false)); } }; |