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>
This commit is contained in:
committed by
Kieran Bingham
parent
3d45b9ad9a
commit
b1b798ef68
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user