diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-27 21:29:01 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-29 00:02:13 +0200 |
commit | 8f8992e4ee181f1efba3b8ab5eb680e425bf1b12 (patch) | |
tree | f1607e86baf8ebe713e0c8a6d4451816a9faea20 | |
parent | eb4ae9e787c0fecd6dfbf665842e02e7970a29fb (diff) |
libcamera: pipeline: ipu3: Fix compilation on gcc 5 and 6
Commit 5e7c5d64a67f ("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: 5e7c5d64a67f ("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>
-rw-r--r-- | src/libcamera/pipeline/ipu3/ipu3.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index b490a801..1e114ca7 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -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(); |