[libcamera-devel] [PATCH] libcamera: pipeline: fix c++20 compile warning

Brett Brotherton bbrotherton at google.com
Tue Nov 14 14:38:19 CET 2023


Hi Laurent,

Thanks for the review, and for making the tweaks to the commit message.  I
believe
that was the only instance, with that patch I was able to build with C++20
for ChromeOS.


On Tue, Nov 14, 2023 at 3:52 AM Laurent Pinchart <
laurent.pinchart at ideasonboard.com> wrote:

> Hi Brett,
>
> Thank you for your first libcamera patch :-)
>
> On Mon, Nov 13, 2023 at 09:52:44AM -0700, Brett Brotherton via
> libcamera-devel wrote:
> > fix -Wdeprecated-this-capture error when building with c++20 by
> > explicity naming this in the capture
>
> Nitpicking, s/fix/Fix/ and s/capture$/capture./
>
> No need to resend the patch for this, I'll update the commit message
> before pushing.
>
> Is this the only occurrence of implicit *this capture ? I'm happy we're
> not doing that bad :-)
>
> > Signed-off-by: Brett Brotherton <bbrotherton at google.com>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> I will run this through build testing and push the patch if no issues
> are found.
>
> > ---
> >  src/libcamera/pipeline_handler.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/libcamera/pipeline_handler.cpp
> b/src/libcamera/pipeline_handler.cpp
> > index 9c74c6cf..2220cb92 100644
> > --- a/src/libcamera/pipeline_handler.cpp
> > +++ b/src/libcamera/pipeline_handler.cpp
> > @@ -649,7 +649,7 @@ void
> PipelineHandler::registerCamera(std::shared_ptr<Camera> camera)
> >   */
> >  void PipelineHandler::hotplugMediaDevice(MediaDevice *media)
> >  {
> > -     media->disconnected.connect(this, [=]() {
> mediaDeviceDisconnected(media); });
> > +     media->disconnected.connect(this, [=, this]() {
> mediaDeviceDisconnected(media); });
> >  }
> >
> >  /**
>
> --
> Regards,
>
> Laurent Pinchart
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20231114/e24a1b1f/attachment.htm>


More information about the libcamera-devel mailing list