We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Needs a check that will do all the same as "readability-use-std-min-max" but for std::clamp instead of std::min or std::max.
std::clamp
std::min
std::max
BEFORE:
void foo() { int a = 2, b = 3, c = 4; if (a < b) a = b; if (a > c) a = c; }
AFTER:
void foo() { int a = 2, b = 3, c = 4; a = std::clamp(a, b, c); }