Use std::clamp() instead of various custom implementations

PR #19501.
This commit is contained in:
Victor Chernyakin
2023-08-27 11:55:08 -07:00
committed by GitHub
parent d8a03cd8d8
commit e045b4678d
3 changed files with 7 additions and 10 deletions

View File

@@ -266,11 +266,7 @@ namespace
{
return [lower, upper](const T value) -> T
{
if (value < lower)
return lower;
if (value > upper)
return upper;
return value;
return std::clamp(value, lower, upper);
};
}