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>,
673673 }
674674
675675 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+ });
682679 }
683680
684681 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+ });
691685 }
692686
693687 // / Determine if this constraint represents explicit conversion,
You can’t perform that action at this time.
0 commit comments