[libcamera-devel,1/3] Documentation: application-developer: Make global variable static
diff mbox series

Message ID 20210926212108.22510-1-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • [libcamera-devel,1/3] Documentation: application-developer: Make global variable static
Related show

Commit Message

Laurent Pinchart Sept. 26, 2021, 9:21 p.m. UTC
The global "camera" variable isn't accessed outside of its compilation
unit. Make it static.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 Documentation/guides/application-developer.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 72e8e03719aa552abce7eeee8a6e4a9b8eb8443e

Comments

Paul Elder Sept. 27, 2021, 7:01 a.m. UTC | #1
Hi Laurent,

On Mon, Sep 27, 2021 at 12:21:06AM +0300, Laurent Pinchart wrote:
> The global "camera" variable isn't accessed outside of its compilation
> unit. Make it static.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> ---
>  Documentation/guides/application-developer.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst
> index ae28c96b5aca..3de13060db08 100644
> --- a/Documentation/guides/application-developer.rst
> +++ b/Documentation/guides/application-developer.rst
> @@ -58,7 +58,7 @@ variable for the camera to support the event call back later:
>  
>  .. code:: cpp
>  
> -   std::shared_ptr<Camera> camera;
> +   static std::shared_ptr<Camera> camera;
>  
>  Create a Camera Manager instance at the beginning of the main function, and then
>  start it. An application must only create a single Camera Manager instance.
> 
> base-commit: 72e8e03719aa552abce7eeee8a6e4a9b8eb8443e
> --
Kieran Bingham Sept. 27, 2021, 12:08 p.m. UTC | #2
On Mon, Sep 27, 2021 at 12:21:06AM +0300, Laurent Pinchart wrote:
> The global "camera" variable isn't accessed outside of its compilation
> unit. Make it static.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

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

> ---
>  Documentation/guides/application-developer.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst
> index ae28c96b5aca..3de13060db08 100644
> --- a/Documentation/guides/application-developer.rst
> +++ b/Documentation/guides/application-developer.rst
> @@ -58,7 +58,7 @@ variable for the camera to support the event call back later:
>  
>  .. code:: cpp
>  
> -   std::shared_ptr<Camera> camera;
> +   static std::shared_ptr<Camera> camera;
>  
>  Create a Camera Manager instance at the beginning of the main function, and then
>  start it. An application must only create a single Camera Manager instance.
> 
> base-commit: 72e8e03719aa552abce7eeee8a6e4a9b8eb8443e
> -- 
> Regards,
> 
> Laurent Pinchart
>
Kieran Bingham Sept. 27, 2021, 12:17 p.m. UTC | #3
On Mon, Sep 27, 2021 at 12:21:06AM +0300, Laurent Pinchart wrote:
> The global "camera" variable isn't accessed outside of its compilation
> unit. Make it static.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

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

> ---
>  Documentation/guides/application-developer.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst
> index ae28c96b5aca..3de13060db08 100644
> --- a/Documentation/guides/application-developer.rst
> +++ b/Documentation/guides/application-developer.rst
> @@ -58,7 +58,7 @@ variable for the camera to support the event call back later:
>  
>  .. code:: cpp
>  
> -   std::shared_ptr<Camera> camera;
> +   static std::shared_ptr<Camera> camera;
>  
>  Create a Camera Manager instance at the beginning of the main function, and then
>  start it. An application must only create a single Camera Manager instance.
> 
> base-commit: 72e8e03719aa552abce7eeee8a6e4a9b8eb8443e
> -- 
> Regards,
> 
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst
index ae28c96b5aca..3de13060db08 100644
--- a/Documentation/guides/application-developer.rst
+++ b/Documentation/guides/application-developer.rst
@@ -58,7 +58,7 @@  variable for the camera to support the event call back later:
 
 .. code:: cpp
 
-   std::shared_ptr<Camera> camera;
+   static std::shared_ptr<Camera> camera;
 
 Create a Camera Manager instance at the beginning of the main function, and then
 start it. An application must only create a single Camera Manager instance.