mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
Fix some VC++ warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cc045d5df8
commit
3f520a7111
@ -308,8 +308,8 @@ private:
|
|||||||
// Define this out-of-line to dissuade the C++ compiler from inlining it.
|
// Define this out-of-line to dissuade the C++ compiler from inlining it.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void SmallVectorImpl<T>::grow(unsigned MinSize) {
|
void SmallVectorImpl<T>::grow(unsigned MinSize) {
|
||||||
unsigned CurCapacity = Capacity-Begin;
|
unsigned CurCapacity = unsigned(Capacity-Begin);
|
||||||
unsigned CurSize = size();
|
unsigned CurSize = unsigned(size());
|
||||||
unsigned NewCapacity = 2*CurCapacity;
|
unsigned NewCapacity = 2*CurCapacity;
|
||||||
if (NewCapacity < MinSize)
|
if (NewCapacity < MinSize)
|
||||||
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
|
// If we already have sufficient space, assign the common elements, then
|
||||||
// destroy any excess.
|
// destroy any excess.
|
||||||
unsigned RHSSize = RHS.size();
|
unsigned RHSSize = unsigned(RHS.size());
|
||||||
unsigned CurSize = size();
|
unsigned CurSize = unsigned(size());
|
||||||
if (CurSize >= RHSSize) {
|
if (CurSize >= RHSSize) {
|
||||||
// Assign common elements.
|
// Assign common elements.
|
||||||
iterator NewEnd = std::copy(RHS.Begin, RHS.Begin+RHSSize, Begin);
|
iterator NewEnd = std::copy(RHS.Begin, RHS.Begin+RHSSize, Begin);
|
||||||
|
Loading…
Reference in New Issue
Block a user