[v2,2/3] libcamera: framebuffer_allocator: Use default destructor
diff mbox series

Message ID 20240310143023.752559-3-pobrn@protonmail.com
State Accepted
Commit ab5816a5406c3e269a0a5449f682cc3be6a50a1b
Headers show
Series
  • couple FrameBufferAllocator changes
Related show

Commit Message

Barnabás Pőcze March 10, 2024, 2:30 p.m. UTC
The compiler generated destructor works fine, so use that.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
---
 src/libcamera/framebuffer_allocator.cpp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Kieran Bingham March 11, 2024, 2:15 p.m. UTC | #1
Quoting Barnabás Pőcze (2024-03-10 14:30:38)
> The compiler generated destructor works fine, so use that.
> 


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

> Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
> ---
>  src/libcamera/framebuffer_allocator.cpp | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
> index 8cf45ab2..fc19a33a 100644
> --- a/src/libcamera/framebuffer_allocator.cpp
> +++ b/src/libcamera/framebuffer_allocator.cpp
> @@ -63,10 +63,7 @@ FrameBufferAllocator::FrameBufferAllocator(std::shared_ptr<Camera> camera)
>  {
>  }
>  
> -FrameBufferAllocator::~FrameBufferAllocator()
> -{
> -       buffers_.clear();
> -}
> +FrameBufferAllocator::~FrameBufferAllocator() = default;
>  
>  /**
>   * \brief Allocate buffers for a configured stream
> -- 
> 2.44.0
> 
>
Jacopo Mondi March 11, 2024, 5:01 p.m. UTC | #2
Hi Barnabás

On Sun, Mar 10, 2024 at 02:30:38PM +0000, Barnabás Pőcze wrote:
> The compiler generated destructor works fine, so use that.
>
> Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

> ---
>  src/libcamera/framebuffer_allocator.cpp | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
> index 8cf45ab2..fc19a33a 100644
> --- a/src/libcamera/framebuffer_allocator.cpp
> +++ b/src/libcamera/framebuffer_allocator.cpp
> @@ -63,10 +63,7 @@ FrameBufferAllocator::FrameBufferAllocator(std::shared_ptr<Camera> camera)
>  {
>  }
>
> -FrameBufferAllocator::~FrameBufferAllocator()
> -{
> -	buffers_.clear();
> -}
> +FrameBufferAllocator::~FrameBufferAllocator() = default;
>
>  /**
>   * \brief Allocate buffers for a configured stream
> --
> 2.44.0
>
>

Patch
diff mbox series

diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
index 8cf45ab2..fc19a33a 100644
--- a/src/libcamera/framebuffer_allocator.cpp
+++ b/src/libcamera/framebuffer_allocator.cpp
@@ -63,10 +63,7 @@  FrameBufferAllocator::FrameBufferAllocator(std::shared_ptr<Camera> camera)
 {
 }
 
-FrameBufferAllocator::~FrameBufferAllocator()
-{
-	buffers_.clear();
-}
+FrameBufferAllocator::~FrameBufferAllocator() = default;
 
 /**
  * \brief Allocate buffers for a configured stream