aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2007-04-19 02:04:09 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2007-04-19 02:04:09 +0000
commit3f520a71117535a3c995933186cc5bc373ffc61f (patch)
tree48406520f82230d637976bb76c517bf8027f6fba
parentcc045d5df8ad029363f2d0c58db87b15748ce67f (diff)
Fix some VC++ warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36259 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/SmallVector.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h
index dc37ac7449..e93177cdcb 100644
--- a/include/llvm/ADT/SmallVector.h
+++ b/include/llvm/ADT/SmallVector.h
@@ -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);