Commit 1a84c427 authored by Christian Persch's avatar Christian Persch

parser: glue: Use std::clamp

parent 441ea0ed
......@@ -270,7 +270,7 @@ public:
int max_v) const noexcept
{
auto v = param(idx, default_v);
return std::min(std::max(v, min_v), max_v);
return std::clamp(v, min_v, max_v);
}
/* param_nonfinal:
......@@ -370,7 +370,7 @@ public:
int max_v) const noexcept
{
int v = __builtin_expect(idx < size(), 1) ? vte_seq_arg_value_final(m_seq->args[idx], default_v) : default_v;
return std::min(std::max(v, min_v), max_v);
return std::clamp(v, min_v, max_v);
}
/* collect_subparams:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment