More 'No need for const & in bool'

This commit is contained in:
Στέφανος 2022-10-04 11:57:15 +03:00
parent 2f1bf0df01
commit 98b35d20a5

View file

@ -65,7 +65,7 @@ namespace Config {
bool _locked(const string& name);
//* Return bool for config key <name>
inline const bool& getB(const string& name) { return bools.at(name); }
inline bool getB(const string& name) { return bools.at(name); }
//* Return integer for config key <name>
inline const int& getI(const string& name) { return ints.at(name); }
@ -81,7 +81,7 @@ namespace Config {
bool stringValid(const string& name, const string& value);
//* Set config key <name> to bool <value>
inline void set(const string& name, const bool& value) {
inline void set(const string& name, bool value) {
if (_locked(name)) boolsTmp.insert_or_assign(name, value);
else bools.at(name) = value;
}