diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-06-25 04:23:30 +0300 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-06-29 16:17:34 +0200 |
commit | 7fc65e9680f604099d5d4f294b37fe7eb93acb03 (patch) | |
tree | eaf53f9b38bbb375d830dabaf07273cb37947c50 /src | |
parent | d8848693bf92c15a4ce18a3ff8b43f537de5e033 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/geometry.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp index fd78cf2c..24c44fb4 100644 --- a/src/libcamera/geometry.cpp +++ b/src/libcamera/geometry.cpp @@ -108,6 +108,12 @@ bool operator==(const Rectangle &lhs, const Rectangle &rhs) */ /** + * \fn bool Size::isNull() const + * \brief Check if the size is null + * \return True if both the width and height are 0, or false otherwise + */ + +/** * \brief Assemble and return a string describing the size * \return A string describing the size */ |