libcamera: geometry: Add isNull() function to Size class

It's common for code to check if a size is null. Add a helper function
to do so.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2020-06-29 16:17:34 +02:00
committed by Niklas Söderlund
parent d8848693bf
commit 7fc65e9680
3 changed files with 17 additions and 0 deletions
+1
View File
@@ -41,6 +41,7 @@ struct Size {
unsigned int width;
unsigned int height;
bool isNull() const { return !width && !height; }
const std::string toString() const;
};