]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/getopt.cpp
Formatting fixes
[libs/core.git] / source / core / getopt.cpp
index 6d96f0b335a568801170f79394ed7886acae1d0b..9040f5d43ec684ecd83d11113931051b4ab13876 100644 (file)
@@ -105,7 +105,7 @@ void GetOpt::operator()(unsigned argc, const char *const *argv)
                        else
                                args_raw.push_back(argv[i++]);
                }
-               
+
                for(; i<argc; ++i)
                        args_raw.push_back(argv[i]);
 
@@ -153,9 +153,9 @@ unsigned GetOpt::process_long(const char *const *argp)
        // See if the argument contains an =
        unsigned equals = 0;
        for(; arg[equals] && arg[equals]!='='; ++equals) ;
-       
+
        OptionImpl &opt = get_option(string(arg, equals));
-       
+
        if(arg[equals])
                // Process the part after the = as option argument
                opt.process(arg+equals+1);
@@ -170,7 +170,7 @@ unsigned GetOpt::process_long(const char *const *argp)
        }
        else
                opt.process();
-       
+
        return 1;
 }
 
@@ -194,7 +194,7 @@ unsigned GetOpt::process_short(const char *const *argp)
                {
                        if(!argp[1])
                                throw usage_error("-"+string(1, *arg)+" requires an argument");
-                       
+
                        // Use the next argument as option argument
                        opt.process(argp[1]);
                        return 2;
@@ -310,7 +310,7 @@ string GetOpt::generate_help() const
                for(ArgumentList::const_iterator i=args.begin(); i!=args.end(); ++i, ++j)
                        result += format("  %s%s%s\n", *j, string(maxw+2-j->size(), ' '), (*i)->get_help());
        }
-       
+
        return result;
 }