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: Ic5fd073faa7391d3f0b37787d6a9c7688c9a3253
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index c46157c..1483456 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -165,7 +165,7 @@
// emit interfacesRemoved signal. In that case it's handled
// by sensorsOwnerMatch
sensorCacheMap[id].reset();
- }));
+ }));
sensorUpdatedMatches.emplace(
s.first, std::make_unique<sdbusplus::bus::match_t>(
bus,
@@ -189,30 +189,30 @@
{
sensorCacheMap[s.first].reset();
}
- }));
+ }));
}
sensorsOwnerMatch = std::make_unique<sdbusplus::bus::match_t>(
bus, nameOwnerChanged(), [](auto& msg) {
- std::string name;
- std::string oldOwner;
- std::string newOwner;
- msg.read(name, oldOwner, newOwner);
+ std::string name;
+ std::string oldOwner;
+ std::string newOwner;
+ msg.read(name, oldOwner, newOwner);
- if (!name.empty() && newOwner.empty())
+ if (!name.empty() && newOwner.empty())
+ {
+ // The service exits
+ const auto it = serviceToIdMap.find(name);
+ if (it == serviceToIdMap.end())
{
- // The service exits
- const auto it = serviceToIdMap.find(name);
- if (it == serviceToIdMap.end())
- {
- return;
- }
- for (const auto& id : it->second)
- {
- // Invalidate cache
- sensorCacheMap[id].reset();
- }
+ return;
}
- });
+ for (const auto& id : it->second)
+ {
+ // Invalidate cache
+ sensorCacheMap[id].reset();
+ }
+ }
+ });
}
#endif