libcamera: geometry: Add isNull() function to Rectangle class
It's common for code to check if a rectangle is null. Add a helper function to do so and test the function in test/geometry.cpp Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -181,6 +181,7 @@ public:
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
|
||||
bool isNull() const { return !width && !height; }
|
||||
const std::string toString() const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user