clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I9bb0aaa05541fe88ccabfaa5d00e3117e489ea8d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/count.hpp b/src/count.hpp
index 3dad8e7..ed0b2c9 100644
--- a/src/count.hpp
+++ b/src/count.hpp
@@ -47,34 +47,35 @@
const std::function<bool(size_t)>& _countOp,
const std::function<bool(T)>& _propertyOp,
bool oneshot = false) :
- IndexedConditional(conditionIndex),
- countOp(_countOp), propertyOp(_propertyOp), oneshot(oneshot)
+ IndexedConditional(conditionIndex), countOp(_countOp),
+ propertyOp(_propertyOp), oneshot(oneshot)
{}
bool operator()() override
{
// Count the number of properties in the index that
// pass the condition specified in the config file.
- auto count = std::count_if(index.cbegin(), index.cend(),
- [this](const auto& item)
- // *INDENT-OFF*
- {
- // Get the property value from storage[0],
- // and save the op result in storage[1].
- const auto& storage = std::get<storageIndex>(item.second);
- // Don't count properties that don't exist.
- if (!std::get<valueIndex>(storage.get()).has_value())
+ auto count = std::count_if(
+ index.cbegin(), index.cend(),
+ [this](const auto& item)
+ // *INDENT-OFF*
{
- return false;
- }
- const auto& value =
- std::any_cast<T>(std::get<valueIndex>(storage.get()));
- auto r = propertyOp(value);
+ // Get the property value from storage[0],
+ // and save the op result in storage[1].
+ const auto& storage = std::get<storageIndex>(item.second);
+ // Don't count properties that don't exist.
+ if (!std::get<valueIndex>(storage.get()).has_value())
+ {
+ return false;
+ }
+ const auto& value =
+ std::any_cast<T>(std::get<valueIndex>(storage.get()));
+ auto r = propertyOp(value);
- std::get<resultIndex>(storage.get()) = r;
+ std::get<resultIndex>(storage.get()) = r;
- return r;
- });
+ return r;
+ });
// *INDENT-ON*
// Now apply the count condition to the count.