From patchwork Sat Aug 22 20:00:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9369 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 40287BE174 for ; Sat, 22 Aug 2020 20:01:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0E4AC6278A; Sat, 22 Aug 2020 22:01:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="gOJR+jsm"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C4B4561EA0 for ; Sat, 22 Aug 2020 22:01:01 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5DAE829E for ; Sat, 22 Aug 2020 22:01:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1598126461; bh=tMryMAYFiC3cHfO+JCVWQRWa7OPbnj4h2RR1UFosYrA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gOJR+jsmBcfILpAjBheeMQdN0R48OsGHseO/AM8/h6hot1ZDnUWJp4BCXQ2gXIoJ8 /vbliV0kp1trrKDk2WkUhSlbvQVF5i21ZjN3e2smWvBWLOdKd5HqinCZrBkZ2VorTg RKgn6VeX7LmEVYd9pD+upkvZU8Gc6HpSwx3/FEQ8= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 22 Aug 2020 23:00:35 +0300 Message-Id: <20200822200037.20892-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200822200037.20892-1-laurent.pinchart@ideasonboard.com> References: <20200822200037.20892-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/5] libcamera: Drop explicit construction of std::queue X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/ipu3/cio2.cpp | 4 +--- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp index abe6d8a592d6..e43ec70fe3e4 100644 --- a/src/libcamera/pipeline/ipu3/cio2.cpp +++ b/src/libcamera/pipeline/ipu3/cio2.cpp @@ -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{}; - + availableBuffers_ = {}; buffers_.clear(); if (output_->releaseBuffers()) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index eeaf335cbcd2..b8f0549f0c60 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -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{}; - data->embeddedQueue_ = std::queue{}; + data->bayerQueue_ = {}; + data->embeddedQueue_ = {}; /* Stop the IPA. */ data->ipa_->stop();