Skip to content

Commit

Permalink
🎨 Clang-Tidy suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
wlambooy committed Jan 14, 2025
1 parent 684b02b commit 058ec48
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions test/algorithms/simulation/sidb/clustercomplete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,10 @@ static bool
verify_clustercomplete_result_by_charge_indices(const charge_distribution_surface<Lyt>& qe_cds,
const std::vector<charge_distribution_surface<Lyt>>& cc_cdss) noexcept
{
for (const auto& cc_cds : cc_cdss)
{
if (cc_cds.get_charge_index_and_base().first == qe_cds.get_charge_index_and_base().first)
{
return true;
}
}

return false;
return std::any_of(cc_cdss.cbegin(), cc_cdss.cend(),
[&](const auto& cc_cds) {
return cc_cds.get_charge_index_and_base().first == qe_cds.get_charge_index_and_base().first;
});
}

TEMPLATE_TEST_CASE("ClusterComplete simulation of a 4 DB layout with a positive charge", "[clustercomplete]",
Expand Down

0 comments on commit 058ec48

Please sign in to comment.