Remove useless inlined functions in ParseComponents.hpp
This commit is contained in:
parent
86985501e5
commit
a75cbeb129
|
@ -12,19 +12,19 @@ class ParseComponent {};
|
|||
struct ParseTree: public ParseComponent {
|
||||
private:
|
||||
mutable unsigned int compCount = 0;
|
||||
inline void addComp(const auto& comp) const {
|
||||
subComponents.push_back(comp); ++compCount;
|
||||
}; inline void addAllComps(const auto& comps) const { for (const auto& comp: comps) addComp(comp); }
|
||||
protected:
|
||||
mutable vector<ParseComponent> subComponents;
|
||||
public:
|
||||
constexpr unsigned int getCompCount() const { return compCount; }
|
||||
auto& getComponents() const { return subComponents; }
|
||||
void add(const ParseComponent& component) { addComp(component); };
|
||||
void addAll(const vector<ParseComponent>& components) { addAllComps(components); }
|
||||
void operator<<(const ParseComponent& component) { add(component); }
|
||||
explicit ParseTree(const ParseComponent& element): subComponents() { addComp(element); }
|
||||
ParseTree(const initializer_list<ParseComponent>& elements): subComponents() { addAllComps(elements); }
|
||||
void add(const ParseComponent& component) const {
|
||||
subComponents.push_back(component);
|
||||
++compCount;
|
||||
}; void addAll(const vector<ParseComponent>& components) const {
|
||||
for (const auto& comp: components) add(comp);
|
||||
}; void operator<<(const ParseComponent& component) const { add(component); }
|
||||
explicit ParseTree(const ParseComponent& element): subComponents() { add(element); }
|
||||
ParseTree(const initializer_list<ParseComponent>& elements): subComponents() { addAll(elements); }
|
||||
ParseTree(): subComponents() {};
|
||||
~ParseTree() = default;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue