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:
Laurent Pinchart
2020-08-22 17:23:37 +03:00
parent b869d4463e
commit f2734ff3ab
6 changed files with 14 additions and 29 deletions

View File

@@ -146,14 +146,6 @@ std::string dirname(const std::string &path)
* \return The number of elements in the intersection of the two ranges
*/
/**
* \fn libcamera::utils::clamp(const T& v, const T& lo, const T& hi)
* \param[in] v The value to clamp
* \param[in] lo The lower boundary to clamp v to
* \param[in] hi The higher boundary to clamp v to
* \return lo if v is less than lo, hi if v is greater than hi, otherwise v
*/
/**
* \typedef clock
* \brief The libcamera clock (monotonic)