From 23986c9cf4ba03a31deddd3b9d328b028f72abfe Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 21 Jul 2014 13:33:51 +0200 Subject: [PATCH] Clean up constructors in the livestatus module --- components/livestatus/avgaggregator.cpp | 6 ++---- components/livestatus/invavgaggregator.cpp | 6 ++---- components/livestatus/invsumaggregator.cpp | 6 ++---- components/livestatus/maxaggregator.cpp | 6 ++---- components/livestatus/minaggregator.cpp | 6 ++---- components/livestatus/stdaggregator.cpp | 6 ++---- components/livestatus/sumaggregator.cpp | 6 ++---- 7 files changed, 14 insertions(+), 28 deletions(-) diff --git a/components/livestatus/avgaggregator.cpp b/components/livestatus/avgaggregator.cpp index 295460ce0..073456a08 100644 --- a/components/livestatus/avgaggregator.cpp +++ b/components/livestatus/avgaggregator.cpp @@ -22,10 +22,8 @@ using namespace icinga; AvgAggregator::AvgAggregator(const String& attr) - : m_Avg(0), m_AvgCount(0) -{ - m_AvgAttr = attr; -} + : m_Avg(0), m_AvgCount(0), m_AvgAttr(attr) +{ } void AvgAggregator::Apply(const Table::Ptr& table, const Value& row) { diff --git a/components/livestatus/invavgaggregator.cpp b/components/livestatus/invavgaggregator.cpp index cf66bedad..7d79f84eb 100644 --- a/components/livestatus/invavgaggregator.cpp +++ b/components/livestatus/invavgaggregator.cpp @@ -22,10 +22,8 @@ using namespace icinga; InvAvgAggregator::InvAvgAggregator(const String& attr) - : m_InvAvg(0), m_InvAvgCount(0) -{ - m_InvAvgAttr = attr; -} + : m_InvAvg(0), m_InvAvgCount(0), m_InvAvgAttr(attr) +{ } void InvAvgAggregator::Apply(const Table::Ptr& table, const Value& row) { diff --git a/components/livestatus/invsumaggregator.cpp b/components/livestatus/invsumaggregator.cpp index 40889b695..095b4e96f 100644 --- a/components/livestatus/invsumaggregator.cpp +++ b/components/livestatus/invsumaggregator.cpp @@ -22,10 +22,8 @@ using namespace icinga; InvSumAggregator::InvSumAggregator(const String& attr) - : m_InvSum(0) -{ - m_InvSumAttr = attr; -} + : m_InvSum(0), m_InvSumAttr(attr) +{ } void InvSumAggregator::Apply(const Table::Ptr& table, const Value& row) { diff --git a/components/livestatus/maxaggregator.cpp b/components/livestatus/maxaggregator.cpp index bca6ab25a..c9a1d4c7e 100644 --- a/components/livestatus/maxaggregator.cpp +++ b/components/livestatus/maxaggregator.cpp @@ -22,10 +22,8 @@ using namespace icinga; MaxAggregator::MaxAggregator(const String& attr) - : m_Max(0) -{ - m_MaxAttr = attr; -} + : m_Max(0), m_MaxAttr(attr) +{ } void MaxAggregator::Apply(const Table::Ptr& table, const Value& row) { diff --git a/components/livestatus/minaggregator.cpp b/components/livestatus/minaggregator.cpp index 4599005cf..a5e40cb00 100644 --- a/components/livestatus/minaggregator.cpp +++ b/components/livestatus/minaggregator.cpp @@ -22,10 +22,8 @@ using namespace icinga; MinAggregator::MinAggregator(const String& attr) - : m_Min(0) -{ - m_MinAttr = attr; -} + : m_Min(0), m_MinAttr(attr) +{ } void MinAggregator::Apply(const Table::Ptr& table, const Value& row) { diff --git a/components/livestatus/stdaggregator.cpp b/components/livestatus/stdaggregator.cpp index 99f2826d1..435994591 100644 --- a/components/livestatus/stdaggregator.cpp +++ b/components/livestatus/stdaggregator.cpp @@ -23,10 +23,8 @@ using namespace icinga; StdAggregator::StdAggregator(const String& attr) - : m_StdSum(0), m_StdQSum(0), m_StdCount(0) -{ - m_StdAttr = attr; -} + : m_StdSum(0), m_StdQSum(0), m_StdCount(0), m_StdAttr(attr) +{ } void StdAggregator::Apply(const Table::Ptr& table, const Value& row) { diff --git a/components/livestatus/sumaggregator.cpp b/components/livestatus/sumaggregator.cpp index a0a19b1be..7c64fe032 100644 --- a/components/livestatus/sumaggregator.cpp +++ b/components/livestatus/sumaggregator.cpp @@ -22,10 +22,8 @@ using namespace icinga; SumAggregator::SumAggregator(const String& attr) - : m_Sum(0) -{ - m_SumAttr = attr; -} + : m_Sum(0), m_SumAttr(attr) +{ } void SumAggregator::Apply(const Table::Ptr& table, const Value& row) {