summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobounce <steffen.winter@proton.me>2023-10-03 13:32:28 +0200
committerSteffen Winter <steffen.winter@proton.me>2024-01-03 17:25:09 +0100
commitb124db78c071af5cae047549559f801d05438d71 (patch)
treeff5054e37fd9a61e2f3dd429c8372943d33d7a5e
parentf6cab3d3bdc06bec91c5b3681fbb2f00418e17ef (diff)
Don't pass int by reference
-rw-r--r--src/btop.cpp2
-rw-r--r--src/btop_config.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/btop.cpp b/src/btop.cpp
index 6a57240..6c7eb99 100644
--- a/src/btop.cpp
+++ b/src/btop.cpp
@@ -112,7 +112,7 @@ namespace Global {
}
//* A simple argument parser
-void argumentParser(const int& argc, char **argv) {
+void argumentParser(const int argc, char **argv) {
for(int i = 1; i < argc; i++) {
const string argument = argv[i];
if (is_in(argument, "-h", "--help")) {
diff --git a/src/btop_config.hpp b/src/btop_config.hpp
index b93509f..8d1d579 100644
--- a/src/btop_config.hpp
+++ b/src/btop_config.hpp
@@ -97,7 +97,7 @@ namespace Config {
}
//* Set config key <name> to int <value>
- inline void set(const std::string_view name, const int& value) {
+ inline void set(const std::string_view name, const int value) {
if (_locked(name)) intsTmp.insert_or_assign(name, value);
else ints.at(name) = value;
}