Return a reference with the ParseTree::getComponents() method.

This commit is contained in:
Username404-59 2021-03-04 15:59:06 +01:00
parent 5972f0ef4c
commit 24195f9a6c
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ class ParseTree {
protected:
vector<ParseComponent> subComponents;
public:
auto getComponents() { return subComponents; }
auto& getComponents() { return subComponents; }
void add(const ParseComponent component) { subComponents.emplace_back(component); };
void addAll(const vector<ParseComponent>& components) { for (const auto& comp: components) add(comp); }
ParseTree(): subComponents() {};