From e96f1720e438e9de4a25077dccd2e39ca3fe0336 Mon Sep 17 00:00:00 2001 From: Chris Frey Date: Mon, 19 Mar 2012 17:46:59 -0400 Subject: [PATCH] lib: added TimeZones operator[] overload --- src/r_calendar.h | 8 +++++++- src/r_timezone.h | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/r_calendar.h b/src/r_calendar.h index 5c82b1f3..40a2f006 100644 --- a/src/r_calendar.h +++ b/src/r_calendar.h @@ -107,7 +107,13 @@ public: // set to your current time zone // as a good default bool TimeZoneValid; // true if the record contained a - // time zone code + // time zone code, or in other words, + // true if TimeZoneCode contains + // valid data. Be sure to set this to + // to true if you desire to write a + // calendar item with a time zone + // to the device, otherwise, the builder + // code will skip the time zone. // unknown UnknownsType Unknowns; diff --git a/src/r_timezone.h b/src/r_timezone.h index 28343136..3b706655 100644 --- a/src/r_timezone.h +++ b/src/r_timezone.h @@ -204,6 +204,9 @@ public: iterator end() { return m_list.end(); } const_iterator end() const { return m_list.end(); } + TimeZone& operator[](int i) { return m_list[i]; } + const TimeZone& operator[](int i) const { return m_list[i]; } + // utility functions - return end() if not found iterator Find(int index); const_iterator Find(int index) const; -- 2.11.4.GIT