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:
Laurent Pinchart
2025-08-15 12:59:14 +03:00
parent 470fa978a8
commit 6e68c391f8
+1 -3
View File
@@ -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;