libcamera: pipeline: ipu3: Fix compilation on gcc 5 and 6

Commit 5e7c5d64a6 ("libcamera: ipu3: Do not unconditionally queue
buffers to CIO2") introduced usage of the std::queue default constructor
by using copy-list-initialization from {}. The default constructor was
explicit in C++11, which was fixed retroactively with a defect report
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0935r0.html).
gcc 5 and 6 are unfortunately affected, requiring explicit usage of the
constructor.

Fixes: 5e7c5d64a6 ("libcamera: ipu3: Do not unconditionally queue buffers to CIO2")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart 2020-03-27 21:29:01 +02:00
parent eb4ae9e787
commit 8f8992e4ee

View file

@ -1532,7 +1532,8 @@ int CIO2Device::allocateBuffers()
void CIO2Device::freeBuffers()
{
availableBuffers_ = {};
/* The default std::queue constructor is explicit with gcc 5 and 6. */
availableBuffers_ = std::queue<FrameBuffer *>{};
buffers_.clear();