clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: I016cb74930cc475843c30bd604e739058effa504
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/metric.cpp b/src/metric.cpp
index 9350099..2504dbf 100644
--- a/src/metric.cpp
+++ b/src/metric.cpp
@@ -30,12 +30,12 @@
void Metric::unregisterFromUpdates(interfaces::MetricListener& listener)
{
- listeners.erase(std::remove_if(
- listeners.begin(), listeners.end(),
- [&listener](const interfaces::MetricListener& item) {
+ listeners.erase(
+ std::remove_if(listeners.begin(), listeners.end(),
+ [&listener](const interfaces::MetricListener& item) {
return &item == &listener;
- }),
- listeners.end());
+ }),
+ listeners.end());
}
void Metric::initialize()
@@ -108,10 +108,9 @@
metrics::CollectionData&
Metric::findAssociatedData(const interfaces::Sensor& notifier)
{
- auto it = std::find_if(sensors.begin(), sensors.end(),
- [¬ifier](const auto& sensor) {
- return sensor.get() == ¬ifier;
- });
+ auto it = std::find_if(
+ sensors.begin(), sensors.end(),
+ [¬ifier](const auto& sensor) { return sensor.get() == ¬ifier; });
auto index = std::distance(sensors.begin(), it);
return *collectionAlgorithms.at(index);
}
diff --git a/src/metrics/collection_function.cpp b/src/metrics/collection_function.cpp
index 7170936..21c8111 100644
--- a/src/metrics/collection_function.cpp
+++ b/src/metrics/collection_function.cpp
@@ -11,13 +11,11 @@
double calculate(const std::vector<ReadingItem>& readings,
Milliseconds) const override
{
- return std::min_element(
- readings.begin(), readings.end(),
- [](const auto& left, const auto& right) {
+ return std::min_element(readings.begin(), readings.end(),
+ [](const auto& left, const auto& right) {
return std::make_tuple(!std::isfinite(left.second), left.second) <
std::make_tuple(!std::isfinite(right.second), right.second);
- })
- ->second;
+ })->second;
}
double calculateForStartupInterval(std::vector<ReadingItem>& readings,
@@ -35,13 +33,11 @@
double calculate(const std::vector<ReadingItem>& readings,
Milliseconds) const override
{
- return std::max_element(
- readings.begin(), readings.end(),
- [](const auto& left, const auto& right) {
+ return std::max_element(readings.begin(), readings.end(),
+ [](const auto& left, const auto& right) {
return std::make_tuple(std::isfinite(left.second), left.second) <
std::make_tuple(std::isfinite(right.second), right.second);
- })
- ->second;
+ })->second;
}
double calculateForStartupInterval(std::vector<ReadingItem>& readings,
diff --git a/src/report.cpp b/src/report.cpp
index c480675..fa1da3f 100644
--- a/src/report.cpp
+++ b/src/report.cpp
@@ -45,8 +45,8 @@
{
readingParameters =
toReadingParameters(utils::transform(metrics, [](const auto& metric) {
- return metric->dumpConfiguration();
- }));
+ return metric->dumpConfiguration();
+ }));
reportActions.insert(ReportAction::logToMetricReportsCollection);
@@ -65,7 +65,7 @@
reportManager.removeReport(this);
});
});
- });
+ });
auto errorMessages = verify(reportingType, interval);
state.set<ReportFlags::enabled, ReportFlags::valid>(enabledIn,
@@ -203,7 +203,7 @@
persistency = storeConfiguration();
}
return 1;
- },
+ },
[this](const auto&) { return state.get<ReportFlags::enabled>(); });
dbusIface->register_method(
"SetReportingProperties",
@@ -255,7 +255,7 @@
persistency = storeConfiguration();
setReadingBuffer(reportUpdates);
- });
+ });
dbusIface->register_property_r<uint64_t>(
"Interval", sdbusplus::vtable::property_::emits_change,
[this](const auto&) { return interval.count(); });
@@ -276,7 +276,7 @@
persistency = oldVal = false;
}
return 1;
- },
+ },
[this](const auto&) { return persistency; });
dbusIface->register_property_r("Readings", readings,
@@ -294,14 +294,14 @@
labeledMetricParams);
readingParameters = toReadingParameters(
utils::transform(metrics, [](const auto& metric) {
- return metric->dumpConfiguration();
- }));
+ return metric->dumpConfiguration();
+ }));
metricCount = getMetricCount(metrics);
setReadingBuffer(reportUpdates);
persistency = storeConfiguration();
oldVal = std::move(newVal);
return 1;
- },
+ },
[this](const auto&) { return readingParameters; });
dbusIface->register_property_r<bool>("EmitsReadingsUpdate",
sdbusplus::vtable::property_::none,
@@ -322,8 +322,8 @@
[this](auto newVal, auto& oldVal) {
auto tmp = utils::transform<std::unordered_set>(
newVal, [](const auto& reportAction) {
- return utils::toReportAction(reportAction);
- });
+ return utils::toReportAction(reportAction);
+ });
tmp.insert(ReportAction::logToMetricReportsCollection);
if (tmp != reportActions)
@@ -333,7 +333,7 @@
oldVal = std::move(newVal);
}
return 1;
- },
+ },
[this](const auto&) {
return utils::transform<std::vector>(reportActions,
[](const auto reportAction) {
@@ -350,17 +350,17 @@
setReportUpdates(utils::toReportUpdates(newVal));
oldVal = newVal;
return 1;
- },
+ },
[this](const auto&) { return utils::enumToString(reportUpdates); });
dbusIface->register_property_r(
"Triggers", std::vector<sdbusplus::message::object_path>{},
sdbusplus::vtable::property_::emits_change, [this](const auto&) {
- return utils::transform<std::vector>(triggerIds,
- [](const auto& triggerId) {
+ return utils::transform<std::vector>(triggerIds,
+ [](const auto& triggerId) {
return utils::pathAppend(utils::constants::triggerDirPath,
triggerId);
- });
});
+ });
dbusIface->register_method("Update", [this] {
if (reportingType == ReportingType::onRequest)
{
@@ -502,10 +502,9 @@
data["Interval"] = interval.count();
data["AppendLimit"] = appendLimit;
data["ReportUpdates"] = utils::toUnderlying(reportUpdates);
- data["ReadingParameters"] = utils::transform(metrics,
- [](const auto& metric) {
- return metric->dumpConfiguration();
- });
+ data["ReadingParameters"] = utils::transform(
+ metrics,
+ [](const auto& metric) { return metric->dumpConfiguration(); });
if (shouldStoreMetricValues())
{
diff --git a/src/report_factory.cpp b/src/report_factory.cpp
index 5f80355..2d7cd40 100644
--- a/src/report_factory.cpp
+++ b/src/report_factory.cpp
@@ -26,19 +26,18 @@
std::vector<LabeledMetricParameters> labeledMetricParams, bool enabled,
Readings readings) const
{
- auto metrics =
- utils::transform(labeledMetricParams,
- [this](const LabeledMetricParameters& param)
- -> std::shared_ptr<interfaces::Metric> {
- namespace ts = utils::tstring;
+ auto metrics = utils::transform(labeledMetricParams,
+ [this](const LabeledMetricParameters& param)
+ -> std::shared_ptr<interfaces::Metric> {
+ namespace ts = utils::tstring;
- return std::make_shared<Metric>(
- getSensors(param.at_label<ts::SensorPath>()),
- param.at_label<ts::OperationType>(),
- param.at_label<ts::CollectionTimeScope>(),
- param.at_label<ts::CollectionDuration>(),
- std::make_unique<Clock>());
- });
+ return std::make_shared<Metric>(
+ getSensors(param.at_label<ts::SensorPath>()),
+ param.at_label<ts::OperationType>(),
+ param.at_label<ts::CollectionTimeScope>(),
+ param.at_label<ts::CollectionDuration>(),
+ std::make_unique<Clock>());
+ });
return std::make_unique<Report>(
bus->get_io_context(), objServer, id, name, reportingType,
@@ -98,14 +97,13 @@
{
using namespace utils::tstring;
- return utils::transform(
- sensorPaths,
- [this](const LabeledSensorInfo& sensorPath)
- -> std::shared_ptr<interfaces::Sensor> {
- return sensorCache.makeSensor<Sensor>(
- sensorPath.at_label<Service>(), sensorPath.at_label<Path>(),
- sensorPath.at_label<Metadata>(), bus->get_io_context(), bus);
- });
+ return utils::transform(sensorPaths,
+ [this](const LabeledSensorInfo& sensorPath)
+ -> std::shared_ptr<interfaces::Sensor> {
+ return sensorCache.makeSensor<Sensor>(
+ sensorPath.at_label<Service>(), sensorPath.at_label<Path>(),
+ sensorPath.at_label<Metadata>(), bus->get_io_context(), bus);
+ });
}
std::vector<LabeledMetricParameters> ReportFactory::convertMetricParams(
diff --git a/src/report_manager.cpp b/src/report_manager.cpp
index 0dcb6d5..3af033a 100644
--- a/src/report_manager.cpp
+++ b/src/report_manager.cpp
@@ -27,8 +27,7 @@
loadFromPersistent();
reportManagerIface = objServer->add_unique_interface(
- reportManagerPath, reportManagerIfaceName,
- [this](auto& dbusIface) {
+ reportManagerPath, reportManagerIfaceName, [this](auto& dbusIface) {
dbusIface.register_property_r("MaxReports", size_t{},
sdbusplus::vtable::property_::const_,
[](const auto&) { return maxReports; });
@@ -39,10 +38,10 @@
"SupportedOperationTypes", std::vector<std::string>{},
sdbusplus::vtable::property_::const_,
[](const auto&) -> std::vector<std::string> {
- return utils::transform<std::vector>(
- utils::convDataOperationType,
- [](const auto& item) { return std::string(item.first); });
- });
+ return utils::transform<std::vector>(
+ utils::convDataOperationType,
+ [](const auto& item) { return std::string(item.first); });
+ });
dbusIface.register_method(
"AddReport",
[this](boost::asio::yield_context& yield, std::string reportId,
@@ -72,17 +71,16 @@
return addReport(yield, reportId, reportName,
utils::toReportingType(reportingType),
- utils::transform(
- reportActions,
- [](const auto& reportAction) {
+ utils::transform(reportActions,
+ [](const auto& reportAction) {
return utils::toReportAction(reportAction);
- }),
+ }),
Milliseconds(interval), appendLimit,
utils::toReportUpdates(reportUpdates),
readingParameters, enabled)
.getPath();
- });
});
+ });
}
void ReportManager::removeReport(const interfaces::Report* report)
@@ -205,7 +203,7 @@
data->at("ReportActions").get<std::vector<uint32_t>>(),
[](const auto reportAction) {
return utils::toReportAction(reportAction);
- });
+ });
uint64_t interval = data->at("Interval").get<uint64_t>();
uint64_t appendLimit = data->at("AppendLimit").get<uint64_t>();
uint32_t reportUpdates = data->at("ReportUpdates").get<uint32_t>();
diff --git a/src/sensor.cpp b/src/sensor.cpp
index efebc5d..048dc52 100644
--- a/src/sensor.cpp
+++ b/src/sensor.cpp
@@ -61,7 +61,7 @@
{
self->updateValue(newValue);
}
- });
+ });
}
void Sensor::registerForUpdates(
@@ -92,14 +92,13 @@
{
if (auto listener = weakListener.lock())
{
- listeners.erase(
- std::remove_if(
- listeners.begin(), listeners.end(),
- [listenerToUnregister = listener.get()](const auto& listener) {
+ listeners.erase(std::remove_if(listeners.begin(), listeners.end(),
+ [listenerToUnregister = listener.get()](
+ const auto& listener) {
return (listener.expired() ||
listener.lock().get() == listenerToUnregister);
- }),
- listeners.end());
+ }),
+ listeners.end());
}
}
@@ -138,7 +137,7 @@
*bus, param,
[weakSelf = weak_from_this()](sdbusplus::message_t& message) {
signalProc(weakSelf, message);
- });
+ });
}
void Sensor::signalProc(const std::weak_ptr<Sensor>& weakSelf,
diff --git a/src/trigger.cpp b/src/trigger.cpp
index a167d3c..b80afa7 100644
--- a/src/trigger.cpp
+++ b/src/trigger.cpp
@@ -32,26 +32,26 @@
{
deleteIface = objServer->add_unique_interface(
path, deleteIfaceName, [this, &ioc, &triggerManager](auto& dbusIface) {
- dbusIface.register_method("Delete", [this, &ioc, &triggerManager] {
- if (persistent)
- {
- triggerStorage.remove(fileName);
- }
- messanger.send(messages::TriggerPresenceChangedInd{
- messages::Presence::Removed, *id, {}});
- boost::asio::post(ioc, [this, &triggerManager] {
- triggerManager.removeTrigger(this);
- });
+ dbusIface.register_method("Delete", [this, &ioc, &triggerManager] {
+ if (persistent)
+ {
+ triggerStorage.remove(fileName);
+ }
+ messanger.send(messages::TriggerPresenceChangedInd{
+ messages::Presence::Removed, *id, {}});
+ boost::asio::post(ioc, [this, &triggerManager] {
+ triggerManager.removeTrigger(this);
});
});
+ });
triggerIface = objServer->add_unique_interface(
path, triggerIfaceName, [this, &triggerFactory](auto& dbusIface) {
- persistent = storeConfiguration();
- dbusIface.register_property_rw(
- "Persistent", persistent,
- sdbusplus::vtable::property_::emits_change,
- [this](bool newVal, const auto&) {
+ persistent = storeConfiguration();
+ dbusIface.register_property_rw(
+ "Persistent", persistent,
+ sdbusplus::vtable::property_::emits_change,
+ [this](bool newVal, const auto&) {
if (newVal == persistent)
{
return 1;
@@ -66,13 +66,13 @@
persistent = false;
}
return 1;
- },
- [this](const auto&) { return persistent; });
+ },
+ [this](const auto&) { return persistent; });
- dbusIface.register_property_rw(
- "Thresholds", TriggerThresholdParams{},
- sdbusplus::vtable::property_::emits_change,
- [this, &triggerFactory](auto newVal, auto& oldVal) {
+ dbusIface.register_property_rw(
+ "Thresholds", TriggerThresholdParams{},
+ sdbusplus::vtable::property_::emits_change,
+ [this, &triggerFactory](auto newVal, auto& oldVal) {
auto newThresholdParams =
std::visit(utils::ToLabeledThresholdParamConversion(), newVal);
TriggerManager::verifyThresholdParams(newThresholdParams);
@@ -81,15 +81,15 @@
newThresholdParams);
oldVal = std::move(newVal);
return 1;
- },
- [this](const auto&) {
+ },
+ [this](const auto&) {
return fromLabeledThresholdParam(getLabeledThresholds());
- });
+ });
- dbusIface.register_property_rw(
- "Sensors", SensorsInfo{},
- sdbusplus::vtable::property_::emits_change,
- [this, &triggerFactory](auto newVal, auto& oldVal) {
+ dbusIface.register_property_rw(
+ "Sensors", SensorsInfo{},
+ sdbusplus::vtable::property_::emits_change,
+ [this, &triggerFactory](auto newVal, auto& oldVal) {
auto labeledSensorInfo =
triggerFactory.getLabeledSensorsInfo(newVal);
triggerFactory.updateSensors(sensors, labeledSensorInfo);
@@ -99,15 +99,15 @@
}
oldVal = std::move(newVal);
return 1;
- },
- [this](const auto&) {
+ },
+ [this](const auto&) {
return utils::fromLabeledSensorsInfo(getLabeledSensorInfo());
- });
+ });
- dbusIface.register_property_rw(
- "Reports", std::vector<sdbusplus::message::object_path>(),
- sdbusplus::vtable::property_::emits_change,
- [this](auto newVal, auto& oldVal) {
+ dbusIface.register_property_rw(
+ "Reports", std::vector<sdbusplus::message::object_path>(),
+ sdbusplus::vtable::property_::emits_change,
+ [this](auto newVal, auto& oldVal) {
auto newReportIds = utils::transform<std::vector>(
newVal,
[](const auto& path) { return utils::reportPathToId(path); });
@@ -117,39 +117,38 @@
messages::Presence::Exist, *id, *reportIds});
oldVal = std::move(newVal);
return 1;
- },
- [this](const auto&) {
+ },
+ [this](const auto&) {
return utils::transform<std::vector>(*reportIds,
[](const auto& id) {
return utils::pathAppend(utils::constants::reportDirPath, id);
});
- });
+ });
- dbusIface.register_property_r(
- "Discrete", isDiscreate(), sdbusplus::vtable::property_::const_,
- [this](const auto& x) { return isDiscreate(); });
+ dbusIface.register_property_r(
+ "Discrete", isDiscreate(), sdbusplus::vtable::property_::const_,
+ [this](const auto& x) { return isDiscreate(); });
- dbusIface.register_property_rw(
- "Name", name, sdbusplus::vtable::property_::emits_change,
- [this](auto newVal, auto& oldVal) {
+ dbusIface.register_property_rw(
+ "Name", name, sdbusplus::vtable::property_::emits_change,
+ [this](auto newVal, auto& oldVal) {
if (newVal.length() > utils::constants::maxIdNameLength)
{
throw errors::InvalidArgument("Name", "Name is too long.");
}
name = oldVal = newVal;
return 1;
- },
- [this](const auto&) { return name; });
+ },
+ [this](const auto&) { return name; });
- dbusIface.register_property_r("TriggerActions",
- std::vector<std::string>(),
- sdbusplus::vtable::property_::const_,
- [this](const auto&) {
+ dbusIface.register_property_r(
+ "TriggerActions", std::vector<std::string>(),
+ sdbusplus::vtable::property_::const_, [this](const auto&) {
return utils::transform(triggerActions, [](const auto& action) {
return actionToString(action);
});
- });
});
+ });
for (const auto& threshold : thresholds)
{
@@ -182,10 +181,9 @@
data["Id"] = *id;
data["Name"] = name;
data["ThresholdParamsDiscriminator"] = labeledThresholdParams.index();
- data["TriggerActions"] = utils::transform(triggerActions,
- [](const auto& action) {
- return actionToString(action);
- });
+ data["TriggerActions"] = utils::transform(
+ triggerActions,
+ [](const auto& action) { return actionToString(action); });
data["ThresholdParams"] =
utils::labeledThresholdParamsToJson(labeledThresholdParams);
data["ReportIds"] = *reportIds;
diff --git a/src/trigger_factory.cpp b/src/trigger_factory.cpp
index 9ac8f49..9f91b77 100644
--- a/src/trigger_factory.cpp
+++ b/src/trigger_factory.cpp
@@ -310,10 +310,9 @@
{
return utils::transform(sensorsInfo, [&tree](const auto& item) {
const auto& [sensorPath, metadata] = item;
- auto found = std::find_if(tree.begin(), tree.end(),
- [path = sensorPath](const auto& x) {
- return x.first == path;
- });
+ auto found = std::find_if(
+ tree.begin(), tree.end(),
+ [path = sensorPath](const auto& x) { return x.first == path; });
if (tree.end() != found)
{
diff --git a/src/trigger_manager.cpp b/src/trigger_manager.cpp
index 984b434..20dee51 100644
--- a/src/trigger_manager.cpp
+++ b/src/trigger_manager.cpp
@@ -21,9 +21,8 @@
{
loadFromPersistent();
- managerIface = objServer->add_unique_interface(triggerManagerPath,
- triggerManagerIfaceName,
- [this](auto& iface) {
+ managerIface = objServer->add_unique_interface(
+ triggerManagerPath, triggerManagerIfaceName, [this](auto& iface) {
iface.register_method(
"AddTrigger",
[this](boost::asio::yield_context& yield, const std::string& id,
@@ -46,7 +45,7 @@
return addTrigger(id, name, triggerActions, labeledSensorsInfo,
reportIds, labeledTriggerThresholdParams)
.getPath();
- });
+ });
});
}
diff --git a/src/types/readings.cpp b/src/types/readings.cpp
index 5782158..47d86fc 100644
--- a/src/types/readings.cpp
+++ b/src/types/readings.cpp
@@ -9,11 +9,11 @@
LabeledReadings toLabeledReadings(const Readings& readings)
{
- return LabeledReadings{std::get<0>(readings),
- utils::transform(std::get<1>(readings),
- [](const auto& readingData) {
+ return LabeledReadings{
+ std::get<0>(readings),
+ utils::transform(std::get<1>(readings), [](const auto& readingData) {
return LabeledReadingData{readingData};
- })};
+ })};
}
Readings toReadings(const LabeledReadings& labeledReadings)
@@ -22,7 +22,7 @@
utils::transform(labeledReadings.at_label<ts::Readings>(),
[](const auto& labeledReadingData) {
return labeledReadingData.to_tuple();
- })};
+ })};
}
} // namespace utils
diff --git a/src/types/report_types.cpp b/src/types/report_types.cpp
index 8e31ae6..bba0e6b 100644
--- a/src/types/report_types.cpp
+++ b/src/types/report_types.cpp
@@ -10,13 +10,12 @@
return utils::transform(labeled,
[](const LabeledMetricParameters& metricParams) {
return ReadingParameters::value_type(
- utils::transform(
- metricParams.at_label<ts::SensorPath>(),
- [](const LabeledSensorInfo& sensorParameters) {
+ utils::transform(metricParams.at_label<ts::SensorPath>(),
+ [](const LabeledSensorInfo& sensorParameters) {
return std::tuple<sdbusplus::message::object_path, std::string>(
sensorParameters.at_label<ts::Path>(),
sensorParameters.at_label<ts::Metadata>());
- }),
+ }),
utils::enumToString(metricParams.at_label<ts::OperationType>()),
utils::enumToString(
metricParams.at_label<ts::CollectionTimeScope>()),
diff --git a/src/utils/conversion.hpp b/src/utils/conversion.hpp
index f528044..e92249a 100644
--- a/src/utils/conversion.hpp
+++ b/src/utils/conversion.hpp
@@ -90,10 +90,9 @@
inline T toEnum(const std::array<std::pair<std::string_view, T>, N>& data,
const std::string& value)
{
- auto it = std::find_if(std::begin(data), std::end(data),
- [&value](const auto& item) {
- return item.first == value;
- });
+ auto it = std::find_if(
+ std::begin(data), std::end(data),
+ [&value](const auto& item) { return item.first == value; });
if (it == std::end(data))
{
throwConversionError(EnumTraits<T>::propertyName);
@@ -106,10 +105,9 @@
enumToString(const std::array<std::pair<std::string_view, T>, N>& data,
T value)
{
- auto it = std::find_if(std::begin(data), std::end(data),
- [value](const auto& item) {
- return item.second == value;
- });
+ auto it = std::find_if(
+ std::begin(data), std::end(data),
+ [value](const auto& item) { return item.second == value; });
if (it == std::end(data))
{
throwConversionError(EnumTraits<T>::propertyName);
diff --git a/src/utils/conversion_trigger.cpp b/src/utils/conversion_trigger.cpp
index 98ae2a5..d577f76 100644
--- a/src/utils/conversion_trigger.cpp
+++ b/src/utils/conversion_trigger.cpp
@@ -44,29 +44,27 @@
const std::vector<numeric::LabeledThresholdParam>& arg) const
{
return utils::transform(
- arg,
- [](const numeric::LabeledThresholdParam& labeledThresholdParam) {
+ arg, [](const numeric::LabeledThresholdParam& labeledThresholdParam) {
return numeric::ThresholdParam(
numeric::typeToString(labeledThresholdParam.at_label<ts::Type>()),
labeledThresholdParam.at_label<ts::DwellTime>(),
numeric::directionToString(
labeledThresholdParam.at_label<ts::Direction>()),
labeledThresholdParam.at_label<ts::ThresholdValue>());
- });
+ });
}
TriggerThresholdParams FromLabeledThresholdParamConversion::operator()(
const std::vector<discrete::LabeledThresholdParam>& arg) const
{
return utils::transform(
- arg,
- [](const discrete::LabeledThresholdParam& labeledThresholdParam) {
+ arg, [](const discrete::LabeledThresholdParam& labeledThresholdParam) {
return discrete::ThresholdParam(
labeledThresholdParam.at_label<ts::UserId>(),
utils::enumToString(labeledThresholdParam.at_label<ts::Severity>()),
labeledThresholdParam.at_label<ts::DwellTime>(),
labeledThresholdParam.at_label<ts::ThresholdValue>());
- });
+ });
}
SensorsInfo fromLabeledSensorsInfo(const std::vector<LabeledSensorInfo>& infos)
diff --git a/src/utils/labeled_tuple.hpp b/src/utils/labeled_tuple.hpp
index b320c3b..c519dd4 100644
--- a/src/utils/labeled_tuple.hpp
+++ b/src/utils/labeled_tuple.hpp
@@ -210,7 +210,7 @@
return std::apply(
[&](auto&&... y) { return (true && ... && detail::eq(x, y)); },
value);
- },
+ },
other.value);
}
diff --git a/src/utils/make_id_name.cpp b/src/utils/make_id_name.cpp
index 1148622..0f78ab6 100644
--- a/src/utils/make_id_name.cpp
+++ b/src/utils/make_id_name.cpp
@@ -49,12 +49,11 @@
{
strippedId = defaultName;
}
- strippedId.erase(std::remove_if(
- strippedId.begin(), strippedId.end(),
- [](char c) {
+ strippedId.erase(std::remove_if(strippedId.begin(), strippedId.end(),
+ [](char c) {
return c == '/' || utils::constants::allowedCharactersInPath.find(c) ==
std::string_view::npos;
- }),
+ }),
strippedId.end());
size_t idx = 0;
diff --git a/src/utils/messanger_service.cpp b/src/utils/messanger_service.cpp
index 25f154c..56c38f6 100644
--- a/src/utils/messanger_service.cpp
+++ b/src/utils/messanger_service.cpp
@@ -16,11 +16,11 @@
void MessangerService::destroy(MessangerService::Context& context)
{
- contexts_.erase(
- std::remove_if(
- contexts_.begin(), contexts_.end(),
- [&context](const auto& item) { return item.get() == &context; }),
- contexts_.end());
+ contexts_.erase(std::remove_if(contexts_.begin(), contexts_.end(),
+ [&context](const auto& item) {
+ return item.get() == &context;
+ }),
+ contexts_.end());
}
boost::asio::execution_context::id MessangerService::id = {};
diff --git a/src/utils/threshold_operations.hpp b/src/utils/threshold_operations.hpp
index 42d469e..99ae4a5 100644
--- a/src/utils/threshold_operations.hpp
+++ b/src/utils/threshold_operations.hpp
@@ -22,11 +22,10 @@
getDetails(ThresholdType* thresholdPtr,
const interfaces::Sensor& sensor)
{
- auto it = std::find_if(thresholdPtr->sensorDetails.begin(),
- thresholdPtr->sensorDetails.end(),
- [&sensor](const auto& x) {
- return &sensor == x.first.get();
- });
+ auto it = std::find_if(
+ thresholdPtr->sensorDetails.begin(),
+ thresholdPtr->sensorDetails.end(),
+ [&sensor](const auto& x) { return &sensor == x.first.get(); });
return *it->second;
}