[gnome-commander: 149/170] noop: use C++ auto keyword, variable renaming




commit a085d8b2c72be9d1b419c8f6d84b7d4ac190055f
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sun Jul 12 22:42:26 2020 +0200

    noop: use C++ auto keyword, variable renaming

 src/gnome-cmd-main-win.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index 60beb01c..d4869851 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -1212,12 +1212,12 @@ void GnomeCmdMainWin::open_tabs(FileSelectorID id)
     if (gnome_cmd_data.tabs[id].empty())
         gnome_cmd_data.tabs[id].push_back(make_pair(string(g_get_home_dir ()), 
make_triple(GnomeCmdFileList::COLUMN_NAME, GTK_SORT_ASCENDING, FALSE)));
 
-    vector<GnomeCmdData::Tab>::const_iterator last_tab = 
unique(gnome_cmd_data.tabs[id].begin(),gnome_cmd_data.tabs[id].end());
+    auto last_tab = unique(gnome_cmd_data.tabs[id].begin(), gnome_cmd_data.tabs[id].end());
 
-    for (vector<GnomeCmdData::Tab>::const_iterator i=gnome_cmd_data.tabs[id].begin(); i!=last_tab; ++i)
+    for (auto tab=gnome_cmd_data.tabs[id].begin(); tab!=last_tab; ++tab)
     {
-        GnomeCmdDir *dir = gnome_cmd_dir_new (home, gnome_cmd_con_create_path (home, i->first.c_str()));
-        fs(id)->new_tab(dir, i->second.first, i->second.second, i->second.third, TRUE);
+        auto *gnomeCmdDir = gnome_cmd_dir_new (home, gnome_cmd_con_create_path (home, tab->first.c_str()));
+        fs(id)->new_tab(gnomeCmdDir, tab->second.first, tab->second.second, tab->second.third, TRUE);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]