From patchwork Wed Mar 4 23:22:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 2959 Return-Path: Received: from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net [195.74.38.228]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0EE586289D for ; Thu, 5 Mar 2020 00:23:46 +0100 (CET) X-Halon-ID: 31fcb537-5e6f-11ea-9f85-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p4fca2392.dip0.t-ipconnect.de [79.202.35.146]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id 31fcb537-5e6f-11ea-9f85-005056917a89; Thu, 05 Mar 2020 00:23:46 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Thu, 5 Mar 2020 00:22:42 +0100 Message-Id: <20200304232246.325384-4-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200304232246.325384-1-niklas.soderlund@ragnatech.se> References: <20200304232246.325384-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 3/7] libcamera: V4L2BufferCache: Mark Entry::operator==() as const 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: , X-List-Received-Date: Wed, 04 Mar 2020 23:23:47 -0000 The comparison operator does not change any state, mark it as const. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/libcamera/include/v4l2_videodevice.h | 2 +- src/libcamera/v4l2_videodevice.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/include/v4l2_videodevice.h b/src/libcamera/include/v4l2_videodevice.h index fcf072641420dacf..359b366454e4e782 100644 --- a/src/libcamera/include/v4l2_videodevice.h +++ b/src/libcamera/include/v4l2_videodevice.h @@ -122,7 +122,7 @@ private: Entry(); Entry(bool free, const FrameBuffer &buffer); - bool operator==(const FrameBuffer &buffer); + bool operator==(const FrameBuffer &buffer) const; bool free; diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 99470ce11421c77c..d88cb0bd0771e545 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -256,7 +256,7 @@ V4L2BufferCache::Entry::Entry(bool free, const FrameBuffer &buffer) planes_.emplace_back(plane); } -bool V4L2BufferCache::Entry::operator==(const FrameBuffer &buffer) +bool V4L2BufferCache::Entry::operator==(const FrameBuffer &buffer) const { const std::vector &planes = buffer.planes();