Resolves clamp is not a member of std error with Buster build.
* https://gitlab.com/CalcProgrammer1/OpenRGB/-/jobs/3359116111#L207
This commit is contained in:
parent
ce5ab1ccf1
commit
1ff192bda2
1 changed files with 1 additions and 1 deletions
2
cli.cpp
2
cli.cpp
|
|
@ -637,7 +637,7 @@ bool OptionBrightness(int* currentDev, std::string argument, Options* options)
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceOptions* currentDevOpts = GetDeviceOptionsForDevID(options, *currentDev);
|
DeviceOptions* currentDevOpts = GetDeviceOptionsForDevID(options, *currentDev);
|
||||||
currentDevOpts->brightness = std::clamp(std::stoi(argument), 0, (int)brightness_percentage);
|
currentDevOpts->brightness = std::min(std::max(std::stoi(argument), 0),(int)brightness_percentage);
|
||||||
currentDevOpts->hasOption = true;
|
currentDevOpts->hasOption = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue