Don't return a reference in the getCompCount method.

This commit is contained in:
Username404-59 2021-03-19 13:16:35 +01:00
parent 38eea2c73d
commit c362f422cd
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 2 additions and 3 deletions

View File

@ -5,8 +5,7 @@
#define YBCON_VERSION "UNKNOWN"
#endif
#include <string>
string getVersion() noexcept { return YBCON_VERSION; }
consteval const char* getVersion() noexcept { return YBCON_VERSION; }
string getFileContent(const string& file);
void setOutputFileContent(const string& language, const string& file, const string& content);

View File

@ -18,7 +18,7 @@ private:
protected:
mutable vector<ParseComponent> subComponents;
public:
unsigned int& getCompCount() const { return compCount; }
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); }