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 {
|
struct ParseTree: public ParseComponent {
|
||||||
private:
|
private:
|
||||||
mutable unsigned int compCount = 0;
|
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:
|
protected:
|
||||||
mutable vector<ParseComponent> subComponents;
|
mutable vector<ParseComponent> subComponents;
|
||||||
public:
|
public:
|
||||||
constexpr unsigned int getCompCount() const { return compCount; }
|
constexpr unsigned int getCompCount() const { return compCount; }
|
||||||
auto& getComponents() const { return subComponents; }
|
auto& getComponents() const { return subComponents; }
|
||||||
void add(const ParseComponent& component) { addComp(component); };
|
void add(const ParseComponent& component) const {
|
||||||
void addAll(const vector<ParseComponent>& components) { addAllComps(components); }
|
subComponents.push_back(component);
|
||||||
void operator<<(const ParseComponent& component) { add(component); }
|
++compCount;
|
||||||
explicit ParseTree(const ParseComponent& element): subComponents() { addComp(element); }
|
}; void addAll(const vector<ParseComponent>& components) const {
|
||||||
ParseTree(const initializer_list<ParseComponent>& elements): subComponents() { addAllComps(elements); }
|
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(): subComponents() {};
|
||||||
~ParseTree() = default;
|
~ParseTree() = default;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue