libcamera: geometry: SizeRange: Add toString()
It's useful to be able to print a string representation of a SizeRange to the log or console, add a toString() method. While at it turn the structure into a class as it contains functions as well as data. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -67,7 +67,9 @@ static inline bool operator>=(const Size &lhs, const Size &rhs)
|
||||
return !(lhs < rhs);
|
||||
}
|
||||
|
||||
struct SizeRange {
|
||||
class SizeRange
|
||||
{
|
||||
public:
|
||||
SizeRange()
|
||||
{
|
||||
}
|
||||
@@ -90,6 +92,8 @@ struct SizeRange {
|
||||
{
|
||||
}
|
||||
|
||||
std::string toString() const;
|
||||
|
||||
Size min;
|
||||
Size max;
|
||||
unsigned int hStep;
|
||||
|
||||
Reference in New Issue
Block a user