From ac7285c9040f0581b0d90af89c71080d0714df3f Mon Sep 17 00:00:00 2001 From: tcoyvwac <53616399+tcoyvwac@users.noreply.github.com> Date: Thu, 14 Apr 2022 16:28:25 +0200 Subject: [PATCH] citra_qt: prefer standard algorithms (#5995) qt_multimedia_camera.cpp: Prefer std::generate over ranged-for loop. --- src/citra_qt/camera/qt_multimedia_camera.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/citra_qt/camera/qt_multimedia_camera.cpp b/src/citra_qt/camera/qt_multimedia_camera.cpp index 00ba03afb..0c3484c36 100644 --- a/src/citra_qt/camera/qt_multimedia_camera.cpp +++ b/src/citra_qt/camera/qt_multimedia_camera.cpp @@ -124,9 +124,8 @@ std::unordered_map> QtMultimediaCameraHandler::loaded; void QtMultimediaCameraHandler::Init() { - for (auto& handler : handlers) { - handler = std::make_shared(); - } + std::generate(std::begin(handlers), std::end(handlers), + std::make_shared); } std::shared_ptr QtMultimediaCameraHandler::GetHandler(