From patchwork Fri Mar 6 15:59:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2993 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0066F628A3 for ; Fri, 6 Mar 2020 17:00:24 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 93A3F24B for ; Fri, 6 Mar 2020 17:00:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583510423; bh=RkzQicivtlWkMIm0eHjiuGRnhvtl/p1tEGUu+UUN38A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V8ORNGZxTHdU7FA/iFKo0fh3pR0Y+jsXVEwhmB2hjC8d/bh8El1uBywgfxTJkfb1L xutqJm8Kg5F+zmhxhF77fQN4eQfQUeODYZTsubZ/CoKiry34BUwbtmYDzUTfH2u88e PelWJ0mCVAMA9UdI1X7TWi7/FECpqXk29vEpWWcM= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 6 Mar 2020 17:59:51 +0200 Message-Id: <20200306160002.30549-22-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200306160002.30549-1-laurent.pinchart@ideasonboard.com> References: <20200306160002.30549-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 21/32] libcamera: controls: Convert bool ControlValue to lowercase strings X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 16:00:24 -0000 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 Reviewed-by: Kieran Bingham --- src/libcamera/controls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index 0663a2201609..94bdbdd9c388 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(data); - str += *value ? "True" : "False"; + str += *value ? "true" : "false"; break; } case ControlTypeByte: {