v4l2: camera: Prevent shadowing within V4L2Camera::Buffer

Rename the internal member variables to use the post-fixed '_' member
variable naming style. This in turn ensures variable shadowing does not
occur in the member initializer list of the constructor.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Kieran Bingham 2020-10-21 16:11:48 +01:00
parent a3ed067996
commit 32d78a7bba
2 changed files with 5 additions and 5 deletions

View file

@ -26,12 +26,12 @@ class V4L2Camera
public:
struct Buffer {
Buffer(unsigned int index, const FrameMetadata &data)
: index(index), data(data)
: index_(index), data_(data)
{
}
unsigned int index;
FrameMetadata data;
unsigned int index_;
FrameMetadata data_;
};
V4L2Camera(std::shared_ptr<Camera> camera);