Applied llvm-else-after-return clang-tidy fixes

This commit is contained in:
Bartek Kryza
2022-12-20 23:56:18 +01:00
parent 8e4c2af279
commit e32e4cd2aa
8 changed files with 17 additions and 36 deletions

View File

@@ -194,12 +194,8 @@ tvl::value_t namespace_filter::match(
return result;
});
}
else {
return tvl::any_of(
namespaces_.begin(), namespaces_.end(), [&e](const auto &nsit) {
return e.get_namespace().starts_with(nsit);
});
}
return tvl::any_of(namespaces_.begin(), namespaces_.end(),
[&e](const auto &nsit) { return e.get_namespace().starts_with(nsit); });
}
element_filter::element_filter(filter_t type, std::vector<std::string> elements)

View File

@@ -70,11 +70,9 @@ public:
if (parent && dynamic_cast<nested_trait<T, Path> *>(&parent.value()))
return dynamic_cast<nested_trait<T, Path> &>(parent.value())
.template add_element<V>(std::move(p));
else {
spdlog::info("No parent element found at: {}", path.to_string());
throw std::runtime_error(
"No parent element found for " + path.to_string());
}
spdlog::info("No parent element found at: {}", path.to_string());
throw std::runtime_error(
"No parent element found for " + path.to_string());
}
template <typename V = T> auto get_element(const Path &path) const

View File

@@ -63,9 +63,7 @@ inline value_t any_of(InputIterator first, InputIterator last, Predicate pred)
res = true;
break;
}
else {
res = false;
}
res = false;
}
}