Skip to content

Commit 04127cb

Browse files
committed
Resolves clamp is not a member of std error reintroduced in f874522.
* Original issue in Debian Buster build https://gitlab.com/CalcProgrammer1/OpenRGB/-/jobs/3359116111#L207
1 parent 085e1fc commit 04127cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ bool OptionBrightness(std::vector<DeviceOptions>* current_devices, std::string a
699699
{
700700
DeviceOptions* currentDevOpts = &current_devices->at(i);
701701

702-
currentDevOpts->brightness = std::clamp(std::stoi(argument), 0, (int)brightness_percentage);
702+
currentDevOpts->brightness = std::min(std::max(std::stoi(argument), 0),(int)brightness_percentage);
703703
currentDevOpts->hasOption = true;
704704
found = true;
705705
}

0 commit comments

Comments
 (0)