libcamera: Drop explicit construction of std::queue

Now that libcamera is using C++17 and requires gcc 7 or newer, we can
use the implicit std::queue constructor. Simplify the code accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2020-08-22 17:27:52 +03:00
parent f2734ff3ab
commit 3ef378731a
2 changed files with 3 additions and 6 deletions

View File

@@ -300,9 +300,7 @@ void CIO2Device::tryReturnBuffer(FrameBuffer *buffer)
void CIO2Device::freeBuffers()
{
/* The default std::queue constructor is explicit with gcc 5 and 6. */
availableBuffers_ = std::queue<FrameBuffer *>{};
availableBuffers_ = {};
buffers_.clear();
if (output_->releaseBuffers())

View File

@@ -848,9 +848,8 @@ void PipelineHandlerRPi::stop(Camera *camera)
/* This also stops the streams. */
data->clearIncompleteRequests();
/* The default std::queue constructor is explicit with gcc 5 and 6. */
data->bayerQueue_ = std::queue<FrameBuffer *>{};
data->embeddedQueue_ = std::queue<FrameBuffer *>{};
data->bayerQueue_ = {};
data->embeddedQueue_ = {};
/* Stop the IPA. */
data->ipa_->stop();