apps: cam: drm: Drop unneeded local variable
The planes variable in the Device::createFrameBuffer() function is a reference to buffer.planes() that is only used as a range initializer in a range-based for loop. Use buffer.planes() directly and drop the variable. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
@@ -659,10 +659,8 @@ std::unique_ptr<FrameBuffer> Device::createFrameBuffer(
|
||||
uint32_t offsets[4] = {};
|
||||
int ret;
|
||||
|
||||
const std::vector<libcamera::FrameBuffer::Plane> &planes = buffer.planes();
|
||||
|
||||
unsigned int i = 0;
|
||||
for (const libcamera::FrameBuffer::Plane &plane : planes) {
|
||||
for (const libcamera::FrameBuffer::Plane &plane : buffer.planes()) {
|
||||
int fd = plane.fd.get();
|
||||
uint32_t handle;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user