Skip to content

Commit e6e6062

Browse files
committed
C#: Address review comments
1 parent db565c5 commit e6e6062

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ class ConstantMatchingCondition extends ConstantCondition {
102102
}
103103

104104
override predicate isWhiteListed() {
105-
exists(SwitchExpr se |
106-
se.getACase().getPattern() = this.(DiscardExpr) and
107-
strictcount(se.getACase()) > 1
105+
exists(SwitchExpr se, int i |
106+
se.getCase(i).getPattern() = this.(DiscardExpr) and
107+
i > 0
108108
)
109109
}
110110

0 commit comments

Comments
 (0)