mirror of
https://github.com/aristocratos/btop.git
synced 2024-09-28 23:31:26 +12:00
More 'No need for const & in bool'
This commit is contained in:
parent
2f1bf0df01
commit
98b35d20a5
1 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ namespace Config {
|
||||||
bool _locked(const string& name);
|
bool _locked(const string& name);
|
||||||
|
|
||||||
//* Return bool for config key <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>
|
//* Return integer for config key <name>
|
||||||
inline const int& getI(const string& name) { return ints.at(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);
|
bool stringValid(const string& name, const string& value);
|
||||||
|
|
||||||
//* Set config key <name> to bool <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);
|
if (_locked(name)) boolsTmp.insert_or_assign(name, value);
|
||||||
else bools.at(name) = value;
|
else bools.at(name) = value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue