summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-02-05 22:14:48 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-02-05 22:14:48 +0000
commita8bd26e8969f9df00ba1b5e3588f4e76516f4e53 (patch)
treeaefcdd304f4940decca4639a581375262a756312
parentc514b5474a3feb6b4b2775b75c4f8eaf0676a9d0 (diff)
downloadbcm5719-llvm-a8bd26e8969f9df00ba1b5e3588f4e76516f4e53.tar.gz
bcm5719-llvm-a8bd26e8969f9df00ba1b5e3588f4e76516f4e53.zip
Simplify code. No functionality change.
llvm-svn: 149850
-rw-r--r--llvm/include/llvm/ADT/SmallVector.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h
index 30fc424a1d0..90a52b8adbd 100644
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/include/llvm/ADT/SmallVector.h
@@ -688,9 +688,7 @@ public:
explicit SmallVector(unsigned Size, const T &Value = T())
: SmallVectorImpl<T>(NumTsAvailable) {
- this->reserve(Size);
- while (Size--)
- this->push_back(Value);
+ this->assign(Size, Value);
}
template<typename ItTy>
@@ -720,9 +718,7 @@ public:
explicit SmallVector(unsigned Size, const T &Value = T())
: SmallVectorImpl<T>(0) {
- this->reserve(Size);
- while (Size--)
- this->push_back(Value);
+ this->assign(Size, Value);
}
template<typename ItTy>
OpenPOWER on IntegriCloud