From patchwork Sun Jun 28 19:09:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 8483 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 1A5FCC2E69 for ; Sun, 28 Jun 2020 19:09:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DE96760AF6; Sun, 28 Jun 2020 21:09:30 +0200 (CEST) Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A4B43603B5 for ; Sun, 28 Jun 2020 21:09:29 +0200 (CEST) X-Halon-ID: cf0f774c-b972-11ea-86ee-0050569116f7 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p4fca2eca.dip0.t-ipconnect.de [79.202.46.202]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA id cf0f774c-b972-11ea-86ee-0050569116f7; Sun, 28 Jun 2020 21:08:54 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Sun, 28 Jun 2020 21:09:20 +0200 Message-Id: <20200628190920.3206340-3-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200628190920.3206340-1-niklas.soderlund@ragnatech.se> References: <20200628190920.3206340-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 2/2] libcamera: ipu3: cio2: Use Size::isNull() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Use the Size::isNull() helper instead of using local code. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- 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. */