summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarnabás Pőcze <pobrn@protonmail.com>2023-12-09 02:22:28 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-01-09 15:39:04 +0000
commitb1b798ef68ea84b02e986b8463442f3fad2ce269 (patch)
tree072fed3c165ba767ab24bc7a119a3d2101ab2376 /src
parent3d45b9ad9aefd4b1e702f89febe4aa6e6d3e2b9c (diff)
libcamera: framebuffer_allocator: Remove unnecessary `clear()`
The vector in question is destroyed when the item in the `buffers_` map is destroyed as a result of the `erase()` call. A vector's destructor already does all the things that `clear()` does, so calling it earlier is not needed. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/framebuffer_allocator.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
index dabd9219..94389735 100644
--- a/src/libcamera/framebuffer_allocator.cpp
+++ b/src/libcamera/framebuffer_allocator.cpp
@@ -121,8 +121,6 @@ int FrameBufferAllocator::free(Stream *stream)
if (iter == buffers_.end())
return -EINVAL;
- std::vector<std::unique_ptr<FrameBuffer>> &buffers = iter->second;
- buffers.clear();
buffers_.erase(iter);
return 0;