[libcamera-devel] [PATCH] Documentation: guides: pipeline-handler: Update clamp() namespace

Jacopo Mondi jacopo at jmondi.org
Wed Sep 30 10:35:02 CEST 2020


Hi Umang,

On Wed, Sep 30, 2020 at 01:02:07PM +0530, Umang Jain wrote:
> Update the sample code using utils::clamp() to std::clamp().
>
> Fixes: f2734ff3ab09 ("libcamera: Replace utils::clamp() with std::clamp()")
> Signed-off-by: Umang Jain <email at uajain.com>

Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>

Thanks
  j

> ---
>  Documentation/guides/pipeline-handler.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
> index 746e206..71ef205 100644
> --- a/Documentation/guides/pipeline-handler.rst
> +++ b/Documentation/guides/pipeline-handler.rst
> @@ -1289,7 +1289,7 @@ range definitions and their corresponding values on the device before being set.
>                   }
>
>                   int32_t value = lroundf(it.second.get<float>() * 128 + offset);
> -                 controls.set(cid, utils::clamp(value, 0, 255));
> +                 controls.set(cid, std::clamp(value, 0, 255));
>            }
>
>            for (const auto &ctrl : controls)
> --
> 2.26.2
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list