aboutsummaryrefslogtreecommitdiff
path: root/source/10-common/SmallVector.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-06-28 12:17:48 -0700
committerrtk0c <[email protected]>2022-06-28 12:17:48 -0700
commit6839736b8283a59eb743e1f6058c7d266a3e7f36 (patch)
treec9fafde01740753a93c3bf3830faa790b88b001c /source/10-common/SmallVector.cpp
parent8a244363c9171946aa6e4552ce0dcfc8edf761cb (diff)
Changeset: 78 Replace "class" keyword in templates with "typename"
Diffstat (limited to 'source/10-common/SmallVector.cpp')
-rw-r--r--source/10-common/SmallVector.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/10-common/SmallVector.cpp b/source/10-common/SmallVector.cpp
index c38e8a7..65953f0 100644
--- a/source/10-common/SmallVector.cpp
+++ b/source/10-common/SmallVector.cpp
@@ -79,7 +79,7 @@ static void report_at_maximum_capacity(size_t MaxSize) {
}
// Note: Moving this function into the header may cause performance regression.
-template <class Size_T>
+template <typename Size_T>
static size_t getNewCapacity(size_t MinSize, size_t TSize, size_t OldCapacity) {
constexpr size_t MaxSize = std::numeric_limits<Size_T>::max();
@@ -102,14 +102,14 @@ static size_t getNewCapacity(size_t MinSize, size_t TSize, size_t OldCapacity) {
}
// Note: Moving this function into the header may cause performance regression.
-template <class Size_T>
+template <typename Size_T>
void* SmallVectorBase<Size_T>::mallocForGrow(size_t MinSize, size_t TSize, size_t& NewCapacity) {
NewCapacity = getNewCapacity<Size_T>(MinSize, TSize, this->capacity());
return malloc(NewCapacity * TSize);
}
// Note: Moving this function into the header may cause performance regression.
-template <class Size_T>
+template <typename Size_T>
void SmallVectorBase<Size_T>::grow_pod(void* FirstEl, size_t MinSize, size_t TSize) {
size_t NewCapacity = getNewCapacity<Size_T>(MinSize, TSize, this->capacity());
void* NewElts;