summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-07-28 13:35:25 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-21 16:15:41 +0100
commit1021b42823b63893a4e7ef36d3192d0221da1b26 (patch)
treeb36aafe00e79eb0bf7add0d900b7e14282bf1568 /src
parentd55f6a803727facbd8ae5df6882a4037086614fd (diff)
libcamera: v4l2_videodevice: Prevent shadowing of V4L2BufferCache members
The members free, and lastUsed were not following the libcamera coding style, and were producing a shadowed parameter on the construction. Rename them to be marked as member variables with the _ postfix accordingly. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/v4l2_videodevice.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 16162e1e..36d7d9a0 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -213,7 +213,7 @@ int V4L2BufferCache::get(const FrameBuffer &buffer)
for (unsigned int index = 0; index < cache_.size(); index++) {
const Entry &entry = cache_[index];
- if (!entry.free)
+ if (!entry.free_)
continue;
/* Try to find a cache hit by comparing the planes. */
@@ -223,9 +223,9 @@ int V4L2BufferCache::get(const FrameBuffer &buffer)
break;
}
- if (entry.lastUsed < oldest) {
+ if (entry.lastUsed_ < oldest) {
use = index;
- oldest = entry.lastUsed;
+ oldest = entry.lastUsed_;
}
}
@@ -249,16 +249,16 @@ int V4L2BufferCache::get(const FrameBuffer &buffer)
void V4L2BufferCache::put(unsigned int index)
{
ASSERT(index < cache_.size());
- cache_[index].free = true;
+ cache_[index].free_ = true;
}
V4L2BufferCache::Entry::Entry()
- : free(true), lastUsed(0)
+ : free_(true), lastUsed_(0)
{
}
V4L2BufferCache::Entry::Entry(bool free, uint64_t lastUsed, const FrameBuffer &buffer)
- : free(free), lastUsed(lastUsed)
+ : free_(free), lastUsed_(lastUsed)
{
for (const FrameBuffer::Plane &plane : buffer.planes())
planes_.emplace_back(plane);