We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3cf80c commit d72aa10Copy full SHA for d72aa10
llvm/include/llvm/ADT/SparseSet.h
@@ -233,7 +233,7 @@ class SparseSet {
233
/// Check if the set contains the given \c Key.
234
///
235
/// @param Key A valid key to find.
236
- bool contains(const KeyT &Key) const { return find(Key) == end() ? 0 : 1; }
+ bool contains(const KeyT &Key) const { return find(Key) != end(); }
237
238
/// count - Returns 1 if this set contains an element identified by Key,
239
/// 0 otherwise.
0 commit comments