[{"id":20055,"web_url":"https://patchwork.libcamera.org/comment/20055/","msgid":"<YVwdetXO9HOASuTf@pendragon.ideasonboard.com>","date":"2021-10-05T09:40:10","subject":"Re: [libcamera-devel] [RFC PATCH 2/6] cam: Remove using namespace\n\tin stream_options.h","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nThank you for the patch.\n\nOn Tue, Oct 05, 2021 at 04:31:10PM +0900, Hirokazu Honda wrote:\n> \"using namespace\" in a header file propagates the namespace to\n> the files including the header file. So it should be avoided.\n> This removes \"using namespace\" in stream_options.h\n> \n> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/cam/stream_options.h | 8 +++-----\n>  1 file changed, 3 insertions(+), 5 deletions(-)\n> \n> diff --git a/src/cam/stream_options.h b/src/cam/stream_options.h\n> index 577391f0..fbbc13a3 100644\n> --- a/src/cam/stream_options.h\n> +++ b/src/cam/stream_options.h\n> @@ -11,8 +11,6 @@\n>  \n>  #include \"options.h\"\n>  \n> -using namespace libcamera;\n> -\n>  class StreamKeyValueParser : public KeyValueParser\n>  {\n>  public:\n> @@ -20,12 +18,12 @@ public:\n>  \n>  \tKeyValueParser::Options parse(const char *arguments) override;\n>  \n> -\tstatic StreamRoles roles(const OptionValue &values);\n> -\tstatic int updateConfiguration(CameraConfiguration *config,\n> +\tstatic libcamera::StreamRoles roles(const OptionValue &values);\n> +\tstatic int updateConfiguration(libcamera::CameraConfiguration *config,\n>  \t\t\t\t       const OptionValue &values);\n>  \n>  private:\n> -\tstatic bool parseRole(StreamRole *role,\n> +\tstatic bool parseRole(libcamera::StreamRole *role,\n>  \t\t\t      const KeyValueParser::Options &options);\n>  };\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4B21AC3243\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  5 Oct 2021 09:40:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CAF6F691B9;\n\tTue,  5 Oct 2021 11:40:18 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2AF05684C6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  5 Oct 2021 11:40:18 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 916DB25B;\n\tTue,  5 Oct 2021 11:40:17 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"D1wBVJdG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1633426817;\n\tbh=wjBbZcCXFk4WrjRNN3AFMarr/4ZTJhGez6EUNu5qJOI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=D1wBVJdG+bNey8CxT0y89aGRzpODRsHIwRdZLMGOo3CDdPkB+k9XhMOlsDPczzgAH\n\t5OhL1IL0vDN3pIomK5ql4F7KKVFZIM9QomsR9Giu2j99pUxNkamLgzC6ZCBcF/z/0V\n\ttk9DFqg/nrshNvt1oq6dBeFOIddy69leqI4u1ixM=","Date":"Tue, 5 Oct 2021 12:40:10 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YVwdetXO9HOASuTf@pendragon.ideasonboard.com>","References":"<20211005073114.3997303-1-hiroh@chromium.org>\n\t<20211005073114.3997303-3-hiroh@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211005073114.3997303-3-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [RFC PATCH 2/6] cam: Remove using namespace\n\tin stream_options.h","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]