summaryrefslogtreecommitdiff
path: root/include/o3tl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-01-11 15:26:59 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-01-11 20:25:08 +0100
commit27cd397b1a1a8a39843c093eff68c5ea6cb249e7 (patch)
treeecf63804421b12987ae070a24a6ed967f29de1d8 /include/o3tl
parent5b19be032c51e0f7489b29c2c98e484587ed0865 (diff)
Drop o3tl/clamp.hxx, use C++17 std::clamp instead
Change-Id: I5043c787dcc3b78bc7fdff130564801194e39f46 Reviewed-on: https://gerrit.libreoffice.org/66177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/o3tl')
-rw-r--r--include/o3tl/clamp.hxx39
1 files changed, 0 insertions, 39 deletions
diff --git a/include/o3tl/clamp.hxx b/include/o3tl/clamp.hxx
deleted file mode 100644
index 06fa22e48cec..000000000000
--- a/include/o3tl/clamp.hxx
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_O3TL_CLAMP_HXX
-#define INCLUDED_O3TL_CLAMP_HXX
-
-#include <sal/config.h>
-
-#include <algorithm>
-#include <cassert>
-
-// C++17 std::clamp
-
-namespace o3tl
-{
-#if defined __cpp_lib_clamp
-
-using std::clamp;
-
-#else
-
-template <typename T> constexpr const T& clamp(const T& v, const T& lo, const T& hi)
-{
- assert(!(hi < lo));
- return v < lo ? lo : (hi < v ? hi : v);
-}
-
-#endif
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */