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>
This commit is contained in:
Laurent Pinchart
2020-03-06 17:18:15 +02:00
parent 97cba0ebea
commit 1716d4e86f

View File

@@ -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: {