[vte] parser: glue: Use std::clamp



commit 1a84c427cd2ea05939b86eb47c21a437d0ce6d79
Author: Christian Persch <chpe src gnome org>
Date:   Fri Oct 19 23:46:03 2018 +0200

    parser: glue: Use std::clamp

 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 d215450f..c07b0be3 100644
--- a/src/parser-glue.hh
+++ b/src/parser-glue.hh
@@ -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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]