diff options
| author | Brian Potchik <brian@vector35.com> | 2018-01-14 03:42:04 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-03-23 17:10:06 -0400 |
| commit | 5f263139ad405f0ecd751f40ccb103e966c2ae64 (patch) | |
| tree | f18377d2f54f6d203c529df592610dce3bef4002 /binaryviewtype.cpp | |
| parent | 86da0eb0216f0d778cce9885ea16588c0a2b0728 (diff) | |
Container Memory Reservations.
Diffstat (limited to 'binaryviewtype.cpp')
| -rw-r--r-- | binaryviewtype.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/binaryviewtype.cpp b/binaryviewtype.cpp index e23838f6..e8ef4f53 100644 --- a/binaryviewtype.cpp +++ b/binaryviewtype.cpp @@ -83,6 +83,7 @@ vector<Ref<BinaryViewType>> BinaryViewType::GetViewTypes() types = BNGetBinaryViewTypes(&count); vector<Ref<BinaryViewType>> result; + result.reserve(count); for (size_t i = 0; i < count; i++) result.push_back(new CoreBinaryViewType(types[i])); @@ -98,6 +99,7 @@ vector<Ref<BinaryViewType>> BinaryViewType::GetViewTypesForData(BinaryView* data types = BNGetBinaryViewTypesForData(data->GetObject(), &count); vector<Ref<BinaryViewType>> result; + result.reserve(count); for (size_t i = 0; i < count; i++) result.push_back(new CoreBinaryViewType(types[i])); |
