File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -673,21 +673,15 @@ class Constraint final : public llvm::ilist_node<Constraint>,
673
673
}
674
674
675
675
unsigned countFavoredNestedConstraints () const {
676
- unsigned count = 0 ;
677
- for (auto *constraint : Nested)
678
- if (constraint->isFavored () && !constraint->isDisabled ())
679
- count++;
680
-
681
- return count;
676
+ return llvm::count_if (Nested, [](const Constraint *constraint) {
677
+ return constraint->isFavored () && !constraint->isDisabled ();
678
+ });
682
679
}
683
680
684
681
unsigned countActiveNestedConstraints () const {
685
- unsigned count = 0 ;
686
- for (auto *constraint : Nested)
687
- if (!constraint->isDisabled ())
688
- count++;
689
-
690
- return count;
682
+ return llvm::count_if (Nested, [](const Constraint *constraint) {
683
+ return !constraint->isDisabled ();
684
+ });
691
685
}
692
686
693
687
// / Determine if this constraint represents explicit conversion,
You can’t perform that action at this time.
0 commit comments