From 5bea5085907e94f967c6f9664cc904bfbadfdf97 Mon Sep 17 00:00:00 2001 From: Aleix Pol i Gonzalez Date: Fri, 10 Jun 2022 20:54:17 +0200 Subject: [PATCH] drm: Readability, no need to copy the modifiers vector --- src/backends/drm/drm_lease_egl_gbm_layer.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/backends/drm/drm_lease_egl_gbm_layer.cpp b/src/backends/drm/drm_lease_egl_gbm_layer.cpp index a9facf2e29..fa8a0436cb 100644 --- a/src/backends/drm/drm_lease_egl_gbm_layer.cpp +++ b/src/backends/drm/drm_lease_egl_gbm_layer.cpp @@ -34,12 +34,7 @@ bool DrmLeaseEglGbmLayer::checkTestBuffer() if (mods.isEmpty()) { newBo = gbm_bo_create(m_pipeline->gpu()->gbmDevice(), size.width(), size.height(), DRM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT); } else { - QVector modifiers; - modifiers.reserve(mods.count()); - for (const auto &mod : mods) { - modifiers << mod; - } - newBo = gbm_bo_create_with_modifiers(m_pipeline->gpu()->gbmDevice(), size.width(), size.height(), DRM_FORMAT_XRGB8888, modifiers.constData(), mods.count()); + newBo = gbm_bo_create_with_modifiers(m_pipeline->gpu()->gbmDevice(), size.width(), size.height(), DRM_FORMAT_XRGB8888, mods.constData(), mods.count()); if (!newBo && errno == ENOSYS) { // gbm implementation doesn't support modifiers newBo = gbm_bo_create(m_pipeline->gpu()->gbmDevice(), size.width(), size.height(), DRM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT);