From 718f5e99a966246de8d129902ad470872652b749 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 16 Mar 2020 10:07:26 +0200 Subject: libcamera: PixelFormat: Make constructor explicit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To achieve the goal of preventing unwanted conversion between a DRM and a V4L2 FourCC, make the PixelFormat constructor that takes an integer value explicit. All users of pixel formats flagged by the compiler are fixed. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Niklas Söderlund --- include/libcamera/pixelformats.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/libcamera/pixelformats.h b/include/libcamera/pixelformats.h index eb40e55a..9ce6f7f0 100644 --- a/include/libcamera/pixelformats.h +++ b/include/libcamera/pixelformats.h @@ -19,7 +19,7 @@ class PixelFormat { public: PixelFormat(); - PixelFormat(uint32_t fourcc, const std::set &modifiers = {}); + explicit PixelFormat(uint32_t fourcc, const std::set &modifiers = {}); bool operator==(const PixelFormat &other) const; bool operator!=(const PixelFormat &other) const { return !(*this == other); } -- cgit v1.2.1