libcamera: geometry: Turn Size and Rectangle into classes

SizeRange is defined as a class while Size and Rectangle are defined as
struct. This is confusing for users in forward declarations. Simplify it
by turning both structures into classes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2020-07-15 01:49:32 +03:00
parent 4f509caa8e
commit 945eedaf2f
4 changed files with 10 additions and 6 deletions
+7 -3
View File
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
* geometry.h - Geometry-related structure
* geometry.h - Geometry-related classes
*/
#ifndef __LIBCAMERA_GEOMETRY_H__
@@ -13,7 +13,9 @@
namespace libcamera {
struct Size {
class Size
{
public:
Size()
: Size(0, 0)
{
@@ -126,7 +128,9 @@ static inline bool operator!=(const SizeRange &lhs, const SizeRange &rhs)
return !(lhs == rhs);
}
struct Rectangle {
class Rectangle
{
public:
Rectangle()
: Rectangle(0, 0, 0, 0)
{