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 Oct 3, 2023
1 parent 636eb25 commit 2fd0f7b
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 @@ -111,7 +111,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 @@ -88,7 +88,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 2fd0f7b

Please sign in to comment.