Fix allocation of more memory in the ParseTree.addAllComponents function
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
3c7835b2a6
commit
663979ea65
|
@ -48,7 +48,7 @@ protected:
|
||||||
void addAllComponents(
|
void addAllComponents(
|
||||||
const initializer_list<T>& components
|
const initializer_list<T>& components
|
||||||
) const {
|
) const {
|
||||||
subComponents.reserve(components.size());
|
subComponents.reserve(subComponents.size() + components.size());
|
||||||
for (const T& current: components) addComponent<T>(current);
|
for (const T& current: components) addComponent<T>(current);
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue