From 7fc65e9680f604099d5d4f294b37fe7eb93acb03 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 25 Jun 2020 04:23:30 +0300 Subject: libcamera: geometry: Add isNull() function to Size class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's common for code to check if a size is null. Add a helper function to do so. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund Signed-off-by: Niklas Söderlund --- include/libcamera/geometry.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/libcamera/geometry.h b/include/libcamera/geometry.h index edda42cf..7d4b8bcf 100644 --- a/include/libcamera/geometry.h +++ b/include/libcamera/geometry.h @@ -41,6 +41,7 @@ struct Size { unsigned int width; unsigned int height; + bool isNull() const { return !width && !height; } const std::string toString() const; }; -- cgit v1.2.1