From b63caaa756ebca7e15a256c534650b68fbd4a046 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 19 Dec 2017 15:58:58 +0100 Subject: [PATCH] Workaround for GCC bug 51494 --- lib/icinga/comment.cpp | 2 +- lib/icinga/downtime.cpp | 2 +- lib/icinga/scheduleddowntime.cpp | 2 +- lib/icinga/timeperiod.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/icinga/comment.cpp b/lib/icinga/comment.cpp index 3bc736f15..9f354fc41 100644 --- a/lib/icinga/comment.cpp +++ b/lib/icinga/comment.cpp @@ -99,7 +99,7 @@ void Comment::Start(bool runtimeCreated) static boost::once_flag once = BOOST_ONCE_INIT; - boost::call_once(once, []() { + boost::call_once(once, [this]() { l_CommentsExpireTimer = new Timer(); l_CommentsExpireTimer->SetInterval(60); l_CommentsExpireTimer->OnTimerExpired.connect(std::bind(&Comment::CommentsExpireTimerHandler)); diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp index 2b5c325d7..df7dd99c4 100644 --- a/lib/icinga/downtime.cpp +++ b/lib/icinga/downtime.cpp @@ -103,7 +103,7 @@ void Downtime::Start(bool runtimeCreated) static boost::once_flag once = BOOST_ONCE_INIT; - boost::call_once(once, []() { + boost::call_once(once, [this]() { l_DowntimesStartTimer = new Timer(); l_DowntimesStartTimer->SetInterval(5); l_DowntimesStartTimer->OnTimerExpired.connect(std::bind(&Downtime::DowntimesStartTimerHandler)); diff --git a/lib/icinga/scheduleddowntime.cpp b/lib/icinga/scheduleddowntime.cpp index d3981fcb2..ac5c47c51 100644 --- a/lib/icinga/scheduleddowntime.cpp +++ b/lib/icinga/scheduleddowntime.cpp @@ -91,7 +91,7 @@ void ScheduledDowntime::Start(bool runtimeCreated) static boost::once_flag once = BOOST_ONCE_INIT; - boost::call_once(once, []() { + boost::call_once(once, [this]() { l_Timer = new Timer(); l_Timer->SetInterval(60); l_Timer->OnTimerExpired.connect(std::bind(&ScheduledDowntime::TimerProc)); diff --git a/lib/icinga/timeperiod.cpp b/lib/icinga/timeperiod.cpp index eed767c45..247b882e8 100644 --- a/lib/icinga/timeperiod.cpp +++ b/lib/icinga/timeperiod.cpp @@ -40,7 +40,7 @@ void TimePeriod::Start(bool runtimeCreated) static boost::once_flag once = BOOST_ONCE_INIT; - boost::call_once(once, []() { + boost::call_once(once, [this]() { l_UpdateTimer = new Timer(); l_UpdateTimer->SetInterval(300); l_UpdateTimer->OnTimerExpired.connect(std::bind(&TimePeriod::UpdateTimerHandler));