From 1ff192bda2d92feb3dabb50865c8d80c9ba4b1ce Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 23 Nov 2022 21:38:33 +1100 Subject: [PATCH] Resolves `clamp is not a member of std` error with 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 5a1d5146..6bf5fa6d 100644 --- a/cli.cpp +++ b/cli.cpp @@ -637,7 +637,7 @@ bool OptionBrightness(int* currentDev, std::string argument, Options* options) } 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; return true; }