The count() function for STL datatypes returns unsigned, even
[oota-llvm.git] / include / llvm / ADT / SmallPtrSet.h
index b52aebf7d55148c2fef048262000b82dfa509b1f..e433c57de743b1010cffb3205fdc96804e49a2e4 100644 (file)
@@ -271,9 +271,9 @@ public:
     return erase_imp(PtrTraits::getAsVoidPointer(Ptr));
   }
 
-  /// count - Return true if the specified pointer is in the set.
-  bool count(PtrType Ptr) const {
-    return count_imp(PtrTraits::getAsVoidPointer(Ptr));
+  /// count - Return 1 if the specified pointer is in the set, 0 otherwise.
+  unsigned count(PtrType Ptr) const {
+    return count_imp(PtrTraits::getAsVoidPointer(Ptr)) ? 1 : 0;
   }
 
   template <typename IterT>