mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-06 20:09:03 +02:00
More changes to std::vector usage.
Replace with std::vector with static array, llvm::SmallVector or add code to reserve space.
This commit is contained in:
@@ -328,6 +328,7 @@ LLType* DtoUnpaddedStructType(Type* dty) {
|
||||
Array& fields = sty->sym->fields;
|
||||
|
||||
std::vector<LLType*> types;
|
||||
types.reserve(fields.dim);
|
||||
|
||||
for (unsigned i = 0; i < fields.dim; i++) {
|
||||
VarDeclaration* vd = static_cast<VarDeclaration*>(fields.data[i]);
|
||||
|
||||
Reference in New Issue
Block a user