Don't return a reference in the getCompCount method.
This commit is contained in:
parent
38eea2c73d
commit
c362f422cd
|
@ -5,8 +5,7 @@
|
||||||
#define YBCON_VERSION "UNKNOWN"
|
#define YBCON_VERSION "UNKNOWN"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
consteval const char* getVersion() noexcept { return YBCON_VERSION; }
|
||||||
string getVersion() noexcept { return YBCON_VERSION; }
|
|
||||||
|
|
||||||
string getFileContent(const string& file);
|
string getFileContent(const string& file);
|
||||||
void setOutputFileContent(const string& language, const string& file, const string& content);
|
void setOutputFileContent(const string& language, const string& file, const string& content);
|
||||||
|
|
|
@ -18,7 +18,7 @@ private:
|
||||||
protected:
|
protected:
|
||||||
mutable vector<ParseComponent> subComponents;
|
mutable vector<ParseComponent> subComponents;
|
||||||
public:
|
public:
|
||||||
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) { addComp(component); };
|
||||||
void addAll(const vector<ParseComponent>& components) { addAllComps(components); }
|
void addAll(const vector<ParseComponent>& components) { addAllComps(components); }
|
||||||
|
|
Loading…
Reference in New Issue