typedef typename KeyFunctorT::argument_type KeyT;
typedef SmallVector<ValueT, 8> DenseT;
+ typedef unsigned size_type;
DenseT Dense;
SparseT *Sparse;
unsigned Universe;
typedef ValueT *pointer;
typedef const ValueT *const_pointer;
- SparseSet() : Sparse(0), Universe(0) {}
+ SparseSet() : Sparse(nullptr), Universe(0) {}
~SparseSet() { free(Sparse); }
/// setUniverse - Set the universe size which determines the largest key the
/// This is not the same as BitVector::size() which returns the size of the
/// universe.
///
- unsigned size() const { return Dense.size(); }
+ size_type size() const { return Dense.size(); }
/// clear - Clears the set. This is a very fast constant time operation.
///
/// count - Returns 1 if this set contains an element identified by Key,
/// 0 otherwise.
///
- unsigned count(const KeyT &Key) const {
+ size_type count(const KeyT &Key) const {
return find(Key) == end() ? 0 : 1;
}