From 8b42bcdd1ad6f3f908d062b189fbc2a6449fae83 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 28 Jun 2007 20:27:24 +0000 Subject: [PATCH] Add a default parameter to a SmallVector constructor to allow it to be called with just an initial length value, just like in std::vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37779 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/SmallVector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 5fcb2b93065..bb8cef4ce8a 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -442,7 +442,7 @@ public: SmallVector() : SmallVectorImpl(NumTsAvailable) { } - SmallVector(unsigned Size, const T &Value) + SmallVector(unsigned Size, const T &Value = T()) : SmallVectorImpl(NumTsAvailable) { this->reserve(Size); while (Size--) -- 2.34.1