[{"id":2835,"web_url":"https://patchwork.libcamera.org/comment/2835/","msgid":"<20191009082127.tfezcicduotmfxox@uno.localdomain>","date":"2019-10-09T08:21:27","subject":"Re: [libcamera-devel] [PATCH 4/9] libcamera: controls: Make\n\tControlList::find() protected","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Tue, Oct 08, 2019 at 01:46:37AM +0300, Laurent Pinchart wrote:\n> To prepare for\n>\nprepare for what ? :)\n\nWith this fixed\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  include/libcamera/controls.h |  3 ++-\n>  src/libcamera/controls.cpp   | 14 ++++++++++++++\n>  2 files changed, 16 insertions(+), 1 deletion(-)\n>\n> diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\n> index a5a6a135ec16..fc33f0762138 100644\n> --- a/include/libcamera/controls.h\n> +++ b/include/libcamera/controls.h\n> @@ -159,10 +159,11 @@ public:\n>  \tconst ControlValue &get(const ControlId &id) const;\n>  \tvoid set(const ControlId &id, const ControlValue &value);\n>\n> -private:\n> +protected:\n>  \tconst ControlValue *find(const ControlId &id) const;\n>  \tControlValue *find(const ControlId &id);\n>\n> +private:\n>  \tControlValidator *validator_;\n>  \tControlListMap controls_;\n>  };\n> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\n> index e528dd80a2a7..afea09d6d7d7 100644\n> --- a/src/libcamera/controls.cpp\n> +++ b/src/libcamera/controls.cpp\n> @@ -515,6 +515,13 @@ void ControlList::set(const ControlId &id, const ControlValue &value)\n>  \t*val = value;\n>  }\n>\n> +/**\n> + * \\brief Find a control in the list\n> + * \\param[in] id The control ID\n> + *\n> + * \\return The control value for the control \\a id, or nullptr if no such\n> + * control exists in the list\n> + */\n>  const ControlValue *ControlList::find(const ControlId &id) const\n>  {\n>  \tconst auto iter = controls_.find(&id);\n> @@ -528,6 +535,13 @@ const ControlValue *ControlList::find(const ControlId &id) const\n>  \treturn &iter->second;\n>  }\n>\n> +/**\n> + * \\brief Find a control in the list\n> + * \\param[in] id The control ID\n> + *\n> + * \\return The control value for the control \\a id, or nullptr if no such\n> + * control exists in the list\n> + */\n>  ControlValue *ControlList::find(const ControlId &id)\n>  {\n>  \tif (validator_ && !validator_->validate(id)) {\n> --\n> Regards,\n>\n> Laurent Pinchart\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 65BF26157B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  9 Oct 2019 10:19:41 +0200 (CEST)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 06450E001C;\n\tWed,  9 Oct 2019 08:19:40 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Wed, 9 Oct 2019 10:21:27 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191009082127.tfezcicduotmfxox@uno.localdomain>","References":"<20191007224642.6597-1-laurent.pinchart@ideasonboard.com>\n\t<20191007224642.6597-5-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"6cdee3ekg77gsvrx\"","Content-Disposition":"inline","In-Reply-To":"<20191007224642.6597-5-laurent.pinchart@ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH 4/9] libcamera: controls: Make\n\tControlList::find() protected","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>","X-List-Received-Date":"Wed, 09 Oct 2019 08:19:41 -0000"}},{"id":2840,"web_url":"https://patchwork.libcamera.org/comment/2840/","msgid":"<20191009091020.GH22998@pendragon.ideasonboard.com>","date":"2019-10-09T09:10:20","subject":"Re: [libcamera-devel] [PATCH 4/9] libcamera: controls: Make\n\tControlList::find() protected","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Wed, Oct 09, 2019 at 10:21:27AM +0200, Jacopo Mondi wrote:\n> On Tue, Oct 08, 2019 at 01:46:37AM +0300, Laurent Pinchart wrote:\n> > To prepare for\n>\n> prepare for what ? :)\n\nWe should be prepared for everything ;-)\n\nActually this patch isn't needed, I'll drop it.\n\n> With this fixed\n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  include/libcamera/controls.h |  3 ++-\n> >  src/libcamera/controls.cpp   | 14 ++++++++++++++\n> >  2 files changed, 16 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\n> > index a5a6a135ec16..fc33f0762138 100644\n> > --- a/include/libcamera/controls.h\n> > +++ b/include/libcamera/controls.h\n> > @@ -159,10 +159,11 @@ public:\n> >  \tconst ControlValue &get(const ControlId &id) const;\n> >  \tvoid set(const ControlId &id, const ControlValue &value);\n> >\n> > -private:\n> > +protected:\n> >  \tconst ControlValue *find(const ControlId &id) const;\n> >  \tControlValue *find(const ControlId &id);\n> >\n> > +private:\n> >  \tControlValidator *validator_;\n> >  \tControlListMap controls_;\n> >  };\n> > diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\n> > index e528dd80a2a7..afea09d6d7d7 100644\n> > --- a/src/libcamera/controls.cpp\n> > +++ b/src/libcamera/controls.cpp\n> > @@ -515,6 +515,13 @@ void ControlList::set(const ControlId &id, const ControlValue &value)\n> >  \t*val = value;\n> >  }\n> >\n> > +/**\n> > + * \\brief Find a control in the list\n> > + * \\param[in] id The control ID\n> > + *\n> > + * \\return The control value for the control \\a id, or nullptr if no such\n> > + * control exists in the list\n> > + */\n> >  const ControlValue *ControlList::find(const ControlId &id) const\n> >  {\n> >  \tconst auto iter = controls_.find(&id);\n> > @@ -528,6 +535,13 @@ const ControlValue *ControlList::find(const ControlId &id) const\n> >  \treturn &iter->second;\n> >  }\n> >\n> > +/**\n> > + * \\brief Find a control in the list\n> > + * \\param[in] id The control ID\n> > + *\n> > + * \\return The control value for the control \\a id, or nullptr if no such\n> > + * control exists in the list\n> > + */\n> >  ControlValue *ControlList::find(const ControlId &id)\n> >  {\n> >  \tif (validator_ && !validator_->validate(id)) {","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3D8976157B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  9 Oct 2019 11:10:31 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 95A6B4FF;\n\tWed,  9 Oct 2019 11:10:30 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1570612230;\n\tbh=wHNawnJSvPVGWwiTzqtkorQk9/GNBiky4yvpsa0Zcj8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=R+YE0Kl3r0hZ3Pt6dAGNkB1XPx1Nl85/guIx2KAOiDMf2C7Z33KzAieq/dR6SE66B\n\tEpimZm6rSVC/qq4PuZQAkcAKToXas80dl0tLdcLgKGXBg/kTLs60pextQgQIaCrA4F\n\taw6seFStfRNpk6SN7ZhsShCNB56swrQniV44NtqU=","Date":"Wed, 9 Oct 2019 12:10:20 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191009091020.GH22998@pendragon.ideasonboard.com>","References":"<20191007224642.6597-1-laurent.pinchart@ideasonboard.com>\n\t<20191007224642.6597-5-laurent.pinchart@ideasonboard.com>\n\t<20191009082127.tfezcicduotmfxox@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20191009082127.tfezcicduotmfxox@uno.localdomain>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 4/9] libcamera: controls: Make\n\tControlList::find() protected","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>","X-List-Received-Date":"Wed, 09 Oct 2019 09:10:31 -0000"}}]