/******************************************************************************
* Icinga 2 *
- * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) *
+ * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/) *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
m_CompatLogPath = compat_log_path;
/* default separators */
- m_Separators.push_back("\n");
- m_Separators.push_back(";");
- m_Separators.push_back(",");
- m_Separators.push_back("|");
+ m_Separators.emplace_back("\n");
+ m_Separators.emplace_back(";");
+ m_Separators.emplace_back(",");
+ m_Separators.emplace_back("|");
String line = lines[0];
aggregators.pop_back();
}
- deq.push_back(filter);
+ deq.emplace_back(filter);
if (&deq == &stats) {
Aggregator::Ptr aggregator = new CountAggregator();
aggregator->SetFilter(filter);
m_Aggregators.swap(aggregators);
}
-int LivestatusQuery::GetExternalCommands(void)
+int LivestatusQuery::GetExternalCommands()
{
boost::mutex::scoped_lock lock(l_QueryMutex);
tokens.emplace_back(std::move(temp_buffer));
if (tokens.size() == 2)
- tokens.push_back("");
+ tokens.emplace_back("");
if (tokens.size() < 3)
return nullptr;
int index = 0;
- for (const Aggregator::Ptr aggregator : m_Aggregators) {
+ for (const Aggregator::Ptr& aggregator : m_Aggregators) {
aggregator->Apply(table, object.Row, &stats[index]);
index++;
}