From 98b35d20a5b3a8e31552de41caecacdd05a3d614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3=CF=84=CE=AD=CF=86=CE=B1=CE=BD=CE=BF=CF=82?= Date: Tue, 4 Oct 2022 11:57:15 +0300 Subject: [PATCH] More 'No need for const & in bool' --- src/btop_config.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/btop_config.hpp b/src/btop_config.hpp index fc1bd91..f60e48d 100644 --- a/src/btop_config.hpp +++ b/src/btop_config.hpp @@ -65,7 +65,7 @@ namespace Config { bool _locked(const string& name); //* Return bool for config key - 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 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 to bool - 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; }