From patchwork Thu Mar 5 20:38:04 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: 2967 Return-Path: Received: from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net [195.74.38.227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 18759627BA for ; Thu, 5 Mar 2020 21:38:22 +0100 (CET) X-Halon-ID: 40a2bab1-5f21-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 40a2bab1-5f21-11ea-9f85-005056917a89; Thu, 05 Mar 2020 21:38:21 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Thu, 5 Mar 2020 21:38:04 +0100 Message-Id: <20200305203808.536050-4-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200305203808.536050-1-niklas.soderlund@ragnatech.se> References: <20200305203808.536050-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 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: Thu, 05 Mar 2020 20:38:22 -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();