aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-09-02 23:37:35 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-09-02 23:37:35 -0500
commitdb764f321a1450da886c672b3ccd82d1e5dfedd6 (patch)
tree86233299dda5f9ee9b3ea55a639f6629da8bf32c
parenta209741aaf8d0ece778e1e2b9e5a8d1632339ad2 (diff)
downloadayatana-indicator-datetime-db764f321a1450da886c672b3ccd82d1e5dfedd6.tar.gz
ayatana-indicator-datetime-db764f321a1450da886c672b3ccd82d1e5dfedd6.tar.bz2
ayatana-indicator-datetime-db764f321a1450da886c672b3ccd82d1e5dfedd6.zip
remove the new code that we're not using yet
-rw-r--r--include/datetime/planner.h1
-rw-r--r--src/planner.cpp38
2 files changed, 0 insertions, 39 deletions
diff --git a/include/datetime/planner.h b/include/datetime/planner.h
index 55e72e7..22b6381 100644
--- a/include/datetime/planner.h
+++ b/include/datetime/planner.h
@@ -43,7 +43,6 @@ public:
protected:
Planner();
static void sort(std::vector<Appointment>&);
- static void trim(std::vector<Appointment>&, const DateTime& begin, const DateTime& end);
};
} // namespace datetime
diff --git a/src/planner.cpp b/src/planner.cpp
index 15dab52..6ca9ca7 100644
--- a/src/planner.cpp
+++ b/src/planner.cpp
@@ -37,33 +37,6 @@ Planner::~Planner()
{
}
-#if 0
-void
-Planner::set_range_to_calendar_month(const DateTime& dt)
-{
- // use appointments that occur in dt's calendar month
- impl->set_range_to_upcoming_month(dt.add_full(0, // no years
- 0, // no months
- -(dt.day_of_month()-1),
- -dt.hour(),
- -dt.minute(),
- -dt.seconds());
-}
-
-void
-Planner::set_range_to_upcoming_month(const DateTime& begin)
-{
- // use appointments that occur in [dt...dt+1month]
- const auto end = begin.add_full(0, 1, 0, 0, 0, -0.1);
- const char * fmt = "%F %T";
- g_debug("RangePlanner %p setting range [%s..%s]",
- this,
- begin.format(fmt).c_str(),
- end.format(fmt).c_str());
- range().set(std::make_pair(begin,end));
-}
-#endif
-
void
Planner::sort(std::vector<Appointment>& appts)
{
@@ -72,17 +45,6 @@ Planner::sort(std::vector<Appointment>& appts)
[](const Appointment& a, const Appointment& b){return a.begin < b.begin;});
}
-void
-Planner::trim(std::vector<Appointment>& appts,
- const DateTime& begin,
- const DateTime& end)
-{
- std::vector<Appointment> tmp;
- auto predicate = [begin,end](const Appointment& a){return begin<=a.begin && a.begin<=end;};
- std::copy_if(std::begin(appts), std::end(appts), std::back_inserter(tmp), predicate);
- appts.swap(tmp);
-}
-
/***
****
***/