[gparted] Argument vector usage improvement (#689689)



commit b7393be2684a1868cf97ff436695a9762555cb82
Author: Mathieu Dupuy <deronnax gmail com>
Date:   Fri Dec 14 13:40:48 2012 +0100

    Argument vector usage improvement (#689689)
    
    Minor change to filling user_devices vector.
    
    Closes Bug #689689 - argument vector filling improvement proposal

 src/main.cc |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/main.cc b/src/main.cc
index 36c2b33..02118d3 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -51,10 +51,7 @@ int main( int argc, char *argv[] )
 	}
 
 	//deal with arguments..
-	std::vector<Glib::ustring> user_devices ;
-	
-	for ( int t = 1 ; t < argc ; t++ )
-		user_devices .push_back( argv[ t ] ) ;
+	std::vector<Glib::ustring> user_devices(argv + 1, argv + argc);
 	
 	GParted::Win_GParted win_gparted( user_devices ) ; 
 	Gtk::Main::run( win_gparted ) ;



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