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>
This commit is contained in:
parent
b869d4463e
commit
f2734ff3ab
6 changed files with 14 additions and 29 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue