aboutsummaryrefslogtreecommitdiff
path: root/src/alarm-queue-simple.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-04-05 18:27:08 -0500
committerCharles Kerr <charles.kerr@canonical.com>2015-04-05 18:27:08 -0500
commit242bab5395d808b0c25b2df8971c11a5f8932001 (patch)
treeb8e16ef47cc36bb3e85d9d26a7aafbc5fb0be817 /src/alarm-queue-simple.cpp
parent32de6c5e866527c03e015f2c691837ea7800290e (diff)
downloadayatana-indicator-datetime-242bab5395d808b0c25b2df8971c11a5f8932001.tar.gz
ayatana-indicator-datetime-242bab5395d808b0c25b2df8971c11a5f8932001.tar.bz2
ayatana-indicator-datetime-242bab5395d808b0c25b2df8971c11a5f8932001.zip
in SimpleAlarmQueue, use references instead of copies when copies aren't necessary
Diffstat (limited to 'src/alarm-queue-simple.cpp')
-rw-r--r--src/alarm-queue-simple.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/alarm-queue-simple.cpp b/src/alarm-queue-simple.cpp
index db0fd21..ae7722c 100644
--- a/src/alarm-queue-simple.cpp
+++ b/src/alarm-queue-simple.cpp
@@ -110,14 +110,14 @@ private:
const auto now = m_clock->localtime();
const auto beginning_of_minute = now.start_of_minute();
- const auto appointments = m_planner->appointments().get();
+ const auto& appointments = m_planner->appointments().get();
g_debug ("planner has %zu appointments in it", (size_t)appointments.size());
for(const auto& appointment : appointments)
{
for(const auto& alarm : appointment.alarms)
{
- const std::pair<std::string,DateTime> trig{appointment.uid, alarm.time};
+ const std::pair<const std::string&,const DateTime&> trig{appointment.uid, alarm.time};
if (m_triggered.count(trig))
continue;
@@ -145,7 +145,7 @@ private:
for (const auto& alarm : appointment.alarms)
{
- const auto trig = std::make_pair(appointment.uid, alarm.time);
+ const std::pair<const std::string&,const DateTime&> trig{appointment.uid, alarm.time};
if (m_triggered.count(trig)) // did we already use this one?
continue;