From aaf1ce50f9602c838428c8a089e28b83666b759b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Tue, 17 Mar 2020 04:29:06 +0100 Subject: libcamera: PixelFormat: Mark all function arguments of type PixelFormat as const reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Laurent Pinchart --- src/libcamera/stream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libcamera/stream.cpp') diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp index 0716de38..e61484ca 100644 --- a/src/libcamera/stream.cpp +++ b/src/libcamera/stream.cpp @@ -127,7 +127,7 @@ std::vector StreamFormats::pixelformats() const * * \return A list of frame sizes or an empty list on error */ -std::vector StreamFormats::sizes(PixelFormat pixelformat) const +std::vector StreamFormats::sizes(const PixelFormat &pixelformat) const { /* * Sizes to try and extract from ranges. @@ -240,7 +240,7 @@ std::vector StreamFormats::sizes(PixelFormat pixelformat) const * * \return A range of valid image sizes or an empty range on error */ -SizeRange StreamFormats::range(PixelFormat pixelformat) const +SizeRange StreamFormats::range(const PixelFormat &pixelformat) const { auto const it = formats_.find(pixelformat); if (it == formats_.end()) -- cgit v1.2.1