mirror of
https://github.com/aristocratos/btop.git
synced 2024-06-01 18:19:56 +12:00
Don't pass int by reference
This commit is contained in:
parent
f6cab3d3bd
commit
b124db78c0
|
@ -112,7 +112,7 @@ namespace Global {
|
||||||
}
|
}
|
||||||
|
|
||||||
//* A simple argument parser
|
//* 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++) {
|
for(int i = 1; i < argc; i++) {
|
||||||
const string argument = argv[i];
|
const string argument = argv[i];
|
||||||
if (is_in(argument, "-h", "--help")) {
|
if (is_in(argument, "-h", "--help")) {
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
//* Set config key <name> to int <value>
|
//* 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);
|
if (_locked(name)) intsTmp.insert_or_assign(name, value);
|
||||||
else ints.at(name) = value;
|
else ints.at(name) = value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue