[libcamera-devel] [PATCH v3 2/2] libcamera: ipu3: cio2: Use Size::isNull()

Niklas Söderlund niklas.soderlund at ragnatech.se
Sun Jun 28 21:09:20 CEST 2020


Use the Size::isNull() helper instead of using local code.

Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
 src/libcamera/pipeline/ipu3/cio2.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp
index 885e2ca0d9677364..aa1459fb3599283b 100644
--- a/src/libcamera/pipeline/ipu3/cio2.cpp
+++ b/src/libcamera/pipeline/ipu3/cio2.cpp
@@ -185,7 +185,7 @@ CIO2Device::generateConfiguration(Size size) const
 	StreamConfiguration cfg;
 
 	/* If no desired size use the sensor resolution. */
-	if (!size.width && !size.height)
+	if (size.isNull())
 		size = sensor_->resolution();
 
 	/* Query the sensor static information for closest match. */
-- 
2.27.0



More information about the libcamera-devel mailing list