minor cleanups. Add provisions for a new standard BLOCKINFO_BLOCK
[oota-llvm.git] / include / llvm / ADT / SmallVector.h
index dc37ac744991fd26fb3bade1b59b1ad5ad99a22c..e93177cdcb748338c28a46fca0ba44c24e2a9a60 100644 (file)
@@ -308,8 +308,8 @@ private:
 // Define this out-of-line to dissuade the C++ compiler from inlining it.
 template <typename T>
 void SmallVectorImpl<T>::grow(unsigned MinSize) {
-  unsigned CurCapacity = Capacity-Begin;
-  unsigned CurSize = size();
+  unsigned CurCapacity = unsigned(Capacity-Begin);
+  unsigned CurSize = unsigned(size());
   unsigned NewCapacity = 2*CurCapacity;
   if (NewCapacity < MinSize)
     NewCapacity = MinSize;
@@ -376,8 +376,8 @@ SmallVectorImpl<T>::operator=(const SmallVectorImpl<T> &RHS) {
   
   // If we already have sufficient space, assign the common elements, then
   // destroy any excess.
-  unsigned RHSSize = RHS.size();
-  unsigned CurSize = size();
+  unsigned RHSSize = unsigned(RHS.size());
+  unsigned CurSize = unsigned(size());
   if (CurSize >= RHSSize) {
     // Assign common elements.
     iterator NewEnd = std::copy(RHS.Begin, RHS.Begin+RHSSize, Begin);