NextPowerOfTwo was already used to ensure that SmallSizePowTwo is a power
authorDuncan Sands <baldrick@free.fr>
Tue, 29 Jun 2010 20:05:34 +0000 (20:05 +0000)
committerDuncan Sands <baldrick@free.fr>
Tue, 29 Jun 2010 20:05:34 +0000 (20:05 +0000)
of two, no need to do it a second time (NextPowerOfTwo is idempotent).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107199 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/SmallPtrSet.h

index ef08125..48637f3 100644 (file)
@@ -236,12 +236,11 @@ class SmallPtrSet : public SmallPtrSetImpl {
   void *SmallArray[SmallSizePowTwo];
   typedef PointerLikeTypeTraits<PtrType> PtrTraits;
 public:
-  SmallPtrSet() : SmallPtrSetImpl(NextPowerOfTwo<SmallSizePowTwo>::Val) {}
+  SmallPtrSet() : SmallPtrSetImpl(SmallSizePowTwo) {}
   SmallPtrSet(const SmallPtrSet &that) : SmallPtrSetImpl(that) {}
 
   template<typename It>
-  SmallPtrSet(It I, It E)
-    : SmallPtrSetImpl(NextPowerOfTwo<SmallSizePowTwo>::Val) {
+  SmallPtrSet(It I, It E) : SmallPtrSetImpl(SmallSizePowTwo) {
     insert(I, E);
   }