[v1,3/6] Documentation: guides: pipeline-handler: Fix configuration creation
diff mbox series

Message ID 20241209174806.283905-3-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • [v1,1/6] Documentation: guides: pipeline-handler: Fix camera creation
Related show

Commit Message

Barnabás Pőcze Dec. 9, 2024, 5:48 p.m. UTC
`PipelineHandler::generateConfiguration()` returns an `std::unique_ptr`.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 Documentation/guides/pipeline-handler.rst | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Kieran Bingham Dec. 10, 2024, 1:38 p.m. UTC | #1
Quoting Barnabás Pőcze (2024-12-09 17:48:03)
> `PipelineHandler::generateConfiguration()` returns an `std::unique_ptr`.
> 


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> ---
>  Documentation/guides/pipeline-handler.rst | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
> index 1574fe738..ec5cf4d55 100644
> --- a/Documentation/guides/pipeline-handler.rst
> +++ b/Documentation/guides/pipeline-handler.rst
> @@ -799,8 +799,7 @@ derived class, and assign it to a base class pointer.
>  
>  .. code-block:: cpp
>  
> -   VividCameraData *data = cameraData(camera);
> -   CameraConfiguration *config = new VividCameraConfiguration();
> +   std::unique_ptr<CameraConfiguration> config = std::make_unique<VividCameraConfiguration>();
>  
>  A ``CameraConfiguration`` is specific to each pipeline, so you can only create
>  it from the pipeline handler code path. Applications can also generate an empty
> -- 
> 2.47.1
>

Patch
diff mbox series

diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
index 1574fe738..ec5cf4d55 100644
--- a/Documentation/guides/pipeline-handler.rst
+++ b/Documentation/guides/pipeline-handler.rst
@@ -799,8 +799,7 @@  derived class, and assign it to a base class pointer.
 
 .. code-block:: cpp
 
-   VividCameraData *data = cameraData(camera);
-   CameraConfiguration *config = new VividCameraConfiguration();
+   std::unique_ptr<CameraConfiguration> config = std::make_unique<VividCameraConfiguration>();
 
 A ``CameraConfiguration`` is specific to each pipeline, so you can only create
 it from the pipeline handler code path. Applications can also generate an empty