[libcamera-devel,v2,1/3] Documentation: Add the missing const to the example code
diff mbox series

Message ID 20220617143549.35442-2-dse@thaumatec.com
State Accepted
Headers show
Series
  • Documentation: Update code examples in Application Writer's Guide
Related show

Commit Message

Daniel Semkowicz June 17, 2022, 2:35 p.m. UTC
Request::BufferMap key type is now const

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
---
 Documentation/guides/application-developer.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Laurent Pinchart June 17, 2022, 2:51 p.m. UTC | #1
Hi Daniel,

Thank you for the patch.

On Fri, Jun 17, 2022 at 04:35:47PM +0200, Daniel Semkowicz via libcamera-devel wrote:
> Request::BufferMap key type is now const
> 
> Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
> ---
>  Documentation/guides/application-developer.rst | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst
> index 8d12a208..6ab8b7e5 100644
> --- a/Documentation/guides/application-developer.rst
> +++ b/Documentation/guides/application-developer.rst
> @@ -410,7 +410,7 @@ images.
>  
>  .. code:: cpp
>  
> -   const std::map<Stream *, FrameBuffer *> &buffers = request->buffers();
> +   const std::map<const Stream *, FrameBuffer *> &buffers = request->buffers();
>  
>  Iterating through the map allows applications to inspect each completed buffer
>  in this request, and access the metadata associated to each frame.
> @@ -518,7 +518,7 @@ and queue all the previously created requests.
>  
>     camera->start();
>     for (std::unique_ptr<Request> &request : requests)
> -      camera->queueRequest(request.get());
> +       camera->queueRequest(request.get());

This change is unrelated. If that's the only issue in the series, no
need to resubmit, I can fix it when applying the patch.

With this fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  
>  Start an event loop
>  ~~~~~~~~~~~~~~~~~~~

Patch
diff mbox series

diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst
index 8d12a208..6ab8b7e5 100644
--- a/Documentation/guides/application-developer.rst
+++ b/Documentation/guides/application-developer.rst
@@ -410,7 +410,7 @@  images.
 
 .. code:: cpp
 
-   const std::map<Stream *, FrameBuffer *> &buffers = request->buffers();
+   const std::map<const Stream *, FrameBuffer *> &buffers = request->buffers();
 
 Iterating through the map allows applications to inspect each completed buffer
 in this request, and access the metadata associated to each frame.
@@ -518,7 +518,7 @@  and queue all the previously created requests.
 
    camera->start();
    for (std::unique_ptr<Request> &request : requests)
-      camera->queueRequest(request.get());
+       camera->queueRequest(request.get());
 
 Start an event loop
 ~~~~~~~~~~~~~~~~~~~