libcamera: PixelFormat: Mark all function arguments of type PixelFormat as const reference

PixelFormat was previously an alias for unsigned int but is now a
class. Make all functions taking PixelFormat do so as a const reference.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Niklas Söderlund
2020-03-18 18:02:40 +01:00
parent 718f5e99a9
commit aaf1ce50f9
12 changed files with 20 additions and 18 deletions
+3 -2
View File
@@ -1487,7 +1487,7 @@ PixelFormat V4L2VideoDevice::toPixelFormat(uint32_t v4l2Fourcc)
*
* \return The V4L2_PIX_FMT_* pixel format code corresponding to \a pixelFormat
*/
uint32_t V4L2VideoDevice::toV4L2Fourcc(PixelFormat pixelFormat)
uint32_t V4L2VideoDevice::toV4L2Fourcc(const PixelFormat &pixelFormat)
{
return V4L2VideoDevice::toV4L2Fourcc(pixelFormat, caps_.isMultiplanar());
}
@@ -1505,7 +1505,8 @@ uint32_t V4L2VideoDevice::toV4L2Fourcc(PixelFormat pixelFormat)
*
* \return The V4L2_PIX_FMT_* pixel format code corresponding to \a pixelFormat
*/
uint32_t V4L2VideoDevice::toV4L2Fourcc(PixelFormat pixelFormat, bool multiplanar)
uint32_t V4L2VideoDevice::toV4L2Fourcc(const PixelFormat &pixelFormat,
bool multiplanar)
{
switch (pixelFormat) {
/* RGB formats. */