Skip to content

Commit d72aa10

Browse files
[ADT] Remove an extraneous ternary operator (NFC)
1 parent e3cf80c commit d72aa10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/ADT/SparseSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class SparseSet {
233233
/// Check if the set contains the given \c Key.
234234
///
235235
/// @param Key A valid key to find.
236-
bool contains(const KeyT &Key) const { return find(Key) == end() ? 0 : 1; }
236+
bool contains(const KeyT &Key) const { return find(Key) != end(); }
237237

238238
/// count - Returns 1 if this set contains an element identified by Key,
239239
/// 0 otherwise.

0 commit comments

Comments
 (0)