[vte/vte-0-56] Revert "parser: glue: Use std::clamp"
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-56] Revert "parser: glue: Use std::clamp"
- Date: Sat, 20 Apr 2019 17:45:26 +0000 (UTC)
commit d08b9d0e4c3dbca586496d1807da9b430de0aadc
Author: Christian Persch <chpe src gnome org>
Date: Sat Apr 20 19:41:46 2019 +0200
Revert "parser: glue: Use std::clamp"
This reverts commit 1a84c427cd2ea05939b86eb47c21a437d0ce6d79.
https://bugzilla.redhat.com/show_bug.cgi?id=1701590
(cherry picked from commit d4da2ac7417c710bc7e9824062ab09d1187e815a)
src/parser-glue.hh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/parser-glue.hh b/src/parser-glue.hh
index c12bb784..9c23a0a3 100644
--- a/src/parser-glue.hh
+++ b/src/parser-glue.hh
@@ -281,7 +281,7 @@ public:
int max_v) const noexcept
{
auto v = param(idx, default_v);
- return std::clamp(v, min_v, max_v);
+ return std::min(std::max(v, min_v), max_v);
}
/* param_nonfinal:
@@ -381,7 +381,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::clamp(v, min_v, max_v);
+ return std::min(std::max(v, min_v), max_v);
}
/* collect_subparams:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]