From 79f96256071eec9ecf7fd2ebb7261d26e5344f9f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 22 May 2020 03:54:29 +0300 Subject: libcamera: pixel_format: Make PixelFormat usable as a constexpr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PixelFormat class is a lightweight wrapper around a 32-bit FourCC and a 64-bit modifier. Make is usable as a constexpr. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- src/libcamera/pixel_format.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/libcamera/pixel_format.cpp b/src/libcamera/pixel_format.cpp index d8718739..d501c5f0 100644 --- a/src/libcamera/pixel_format.cpp +++ b/src/libcamera/pixel_format.cpp @@ -25,25 +25,19 @@ namespace libcamera { */ /** + * \fn PixelFormat::PixelFormat() * \brief Construct a PixelFormat with an invalid format * * PixelFormat instances constructed with the default constructor are * invalid, calling the isValid() function returns false. */ -PixelFormat::PixelFormat() - : fourcc_(0) -{ -} /** + * \fn PixelFormat::PixelFormat(uint32_t fourcc, uint64_t modifier) * \brief Construct a PixelFormat from a DRM FourCC and a modifier * \param[in] fourcc A DRM FourCC * \param[in] modifier A DRM FourCC modifier */ -PixelFormat::PixelFormat(uint32_t fourcc, uint64_t modifier) - : fourcc_(fourcc), modifier_(modifier) -{ -} /** * \brief Compare pixel formats for equality -- cgit v1.2.1