From: dooglus Date: Sun, 6 Apr 2008 19:26:41 +0000 (+0000) Subject: Simplify the code a little. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=65a7211a8d7ec35c42c48ae54c19cbc91f3372a0;p=synfig.git Simplify the code a little. git-svn-id: http://svn.voria.com/code@1966 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/main.cpp b/synfig-studio/trunk/src/gtkmm/main.cpp index 5901bcc..5e34cfa 100644 --- a/synfig-studio/trunk/src/gtkmm/main.cpp +++ b/synfig-studio/trunk/src/gtkmm/main.cpp @@ -73,19 +73,15 @@ int main(int argc, char **argv) cout << " " << _("synfig studio is already running") << endl << endl; cout << " " << _("the existing process will be used") << endl << endl;; - fprintf(file.get(),"F\n"); - // Hey, another copy of us is open! // don't bother opening us, just go ahead and // tell the other copy to load it all up - if(argc>=1) - { - for(;argc>=1;(argc)--) - if((argv)[argc] && (argv)[argc][0]!='-') - { - fprintf(file.get(),"O %s\n",etl::absolute_path((argv)[argc]).c_str()); - } - } + if (argc>1) + fprintf(file.get(),"F\n"); + + while(--argc) + if((argv)[argc] && (argv)[argc][0]!='-') + fprintf(file.get(),"O %s\n",etl::absolute_path((argv)[argc]).c_str()); fprintf(file.get(),"F\n");