mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
libcamera: geometry: Add 0-initialized SizeRange constructor
Add constructor to SizeRange which initialize all the size range fields to 0. While at there make the in-line constructor declarations respect the coding style by moving braces to a new line. 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:
parent
88646061e0
commit
05a8608f1f
2 changed files with 18 additions and 2 deletions
|
@ -73,7 +73,16 @@ const std::string Rectangle::toString() const
|
|||
|
||||
/**
|
||||
* \fn SizeRange::SizeRange()
|
||||
* \brief Construct a size range
|
||||
* \brief Construct a size range initialized to 0
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn SizeRange::SizeRange(unsigned int minW, unsigned int minH, unsigned int maxW, unsigned int maxH)
|
||||
* \brief Construct an initialized size range
|
||||
* \param minW The minimum width
|
||||
* \param minH The minimum height
|
||||
* \param maxW The maximum width
|
||||
* \param maxH The maximum height
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,10 +22,17 @@ struct Rectangle {
|
|||
};
|
||||
|
||||
struct SizeRange {
|
||||
SizeRange()
|
||||
: SizeRange(0, 0, 0, 0)
|
||||
{
|
||||
}
|
||||
|
||||
SizeRange(unsigned int minW, unsigned int minH,
|
||||
unsigned int maxW, unsigned int maxH)
|
||||
: minWidth(minW), minHeight(minH), maxWidth(maxW),
|
||||
maxHeight(maxH) {}
|
||||
maxHeight(maxH)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int minWidth;
|
||||
unsigned int minHeight;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue