[libcamera-devel] [PATCH v2 2/2] test: represent uninitialised values via ControlTypeNone

Christian Rauch Rauch.Christian at gmx.de
Tue Aug 30 22:21:24 CEST 2022


Previously, not explicitly initialised values were represented by 0. This
was replaced by ControlTypeNone for better semantics.

Signed-off-by: Christian Rauch <Rauch.Christian at gmx.de>
---
 test/controls/control_info.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/controls/control_info.cpp b/test/controls/control_info.cpp
index 2827473b..56b4101f 100644
--- a/test/controls/control_info.cpp
+++ b/test/controls/control_info.cpp
@@ -26,8 +26,8 @@ protected:
 		 */
 		ControlInfo brightness;

-		if (brightness.min().get<int32_t>() != 0 ||
-		    brightness.max().get<int32_t>() != 0) {
+		if (brightness.min().type() != ControlType::ControlTypeNone ||
+		    brightness.max().type() != ControlType::ControlTypeNone) {
 			cout << "Invalid control range for Brightness" << endl;
 			return TestFail;
 		}
--
2.34.1



More information about the libcamera-devel mailing list