From 04127cb201427dcdf00f5a2e36b877af32932f02 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 26 Nov 2022 11:17:17 +1100 Subject: [PATCH] Resolves `clamp is not a member of std` error reintroduced in f8745221. * Original issue in Debian Buster build https://gitlab.com/CalcProgrammer1/OpenRGB/-/jobs/3359116111#L207 --- cli.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.cpp b/cli.cpp index 51a7d924..60849a0e 100644 --- a/cli.cpp +++ b/cli.cpp @@ -699,7 +699,7 @@ bool OptionBrightness(std::vector* current_devices, std::string a { DeviceOptions* currentDevOpts = ¤t_devices->at(i); - 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; found = true; }