summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-06 17:18:15 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-06 18:10:40 +0200
commit1716d4e86f58f7827786f03290bcbec7d9415a29 (patch)
tree4b02733cf30c2d1639522cb8b630d773719ef1b5
parent97cba0ebea6e553065f77f18471b3a5997c390d4 (diff)
libcamera: controls: Convert bool ControlValue to lowercase strings
The C++ boolean types are lower case, and std::ostream::operator<<(bool) produces a lowercase string (when std::boolalpha is in effect, otherwise it produces 0 or 1). Switch ControlValue::toString() to produce lowercase "true" and "false" strings too for consistency. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/libcamera/controls.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index 0663a220..94bdbdd9 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -198,7 +198,7 @@ std::string ControlValue::toString() const
switch (type_) {
case ControlTypeBool: {
const bool *value = reinterpret_cast<const bool *>(data);
- str += *value ? "True" : "False";
+ str += *value ? "true" : "false";
break;
}
case ControlTypeByte: {