diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-08-22 17:23:37 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-08-25 02:03:16 +0300 |
commit | f2734ff3ab09d3ab78321daf61d18cb628da2b98 (patch) | |
tree | 5604776f1d76221a964319e60500eb8106657333 /include | |
parent | b869d4463ef38934da35ffaf287870541e0dee47 (diff) |
libcamera: Replace utils::clamp() with std::clamp()
Now that libcamera uses C++17, the C++ standard library provides
std::clamp(). Drop our custom utils::clamp() function.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/utils.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/include/libcamera/internal/utils.h b/include/libcamera/internal/utils.h index 45cd6f12..a1b644b0 100644 --- a/include/libcamera/internal/utils.h +++ b/include/libcamera/internal/utils.h @@ -65,13 +65,6 @@ unsigned int set_overlap(InputIt1 first1, InputIt1 last1, return count; } -/* C++11 doesn't provide std::clamp */ -template <typename T> -const T& clamp(const T& v, const T& lo, const T& hi) -{ - return std::max(lo, std::min(v, hi)); -} - using clock = std::chrono::steady_clock; using duration = std::chrono::steady_clock::duration; using time_point = std::chrono::steady_clock::time_point; |