[vlmc-devel] MainWindow: Use const lvalue renference if possible

Yikai Lu git at videolan.org
Tue Jun 20 17:55:51 CEST 2017


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Tue Jun 20 23:28:07 2017 +0900| [ccf1c6fce59935bbc6c750b0c7e3cb7d7e30b96b] | committer: Yikai Lu

MainWindow: Use const lvalue renference if possible

> https://code.videolan.org/videolan/vlmc/commit/ccf1c6fce59935bbc6c750b0c7e3cb7d7e30b96b
---

 src/Gui/MainWindow.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 37e35074..e1161e55 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -857,8 +857,8 @@ MainWindow::updateRecentProjects()
     for ( const auto& var : Core::instance()->recentProjects()->toVariant().toList() )
     {
         const auto& m = var.toMap();
-        auto name = m["name"].toString();
-        auto file = m["file"].toString();
+        const auto& name = m["name"].toString();
+        const auto& file = m["file"].toString();
         auto action = menu->addAction( QString( "%1 - %2" )
                                        .arg( name )
                                        .arg( file )



More information about the Vlmc-devel mailing list