Skip to content

Commit

Permalink
Don't pass int by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
imwints committed Jan 3, 2024
1 parent 27c6f11 commit 5aed064
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/btop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
2 changes: 1 addition & 1 deletion src/btop_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,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;
}
Expand Down

0 comments on commit 5aed064

Please sign in to comment.