]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/getopt.cpp
Remove unnecessary std:: qualifiers
[libs/core.git] / source / core / getopt.cpp
index 6d96f0b335a568801170f79394ed7886acae1d0b..0f8886ad746a542e3a40b36ed8e7c2ddcd0c1e19 100644 (file)
@@ -105,7 +105,7 @@ void GetOpt::operator()(unsigned argc, const char *const *argv)
                        else
                                args_raw.push_back(argv[i++]);
                }
                        else
                                args_raw.push_back(argv[i++]);
                }
-               
+
                for(; i<argc; ++i)
                        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) ;
        // See if the argument contains an =
        unsigned equals = 0;
        for(; arg[equals] && arg[equals]!='='; ++equals) ;
-       
+
        OptionImpl &opt = get_option(string(arg, equals));
        OptionImpl &opt = get_option(string(arg, equals));
-       
+
        if(arg[equals])
                // Process the part after the = as option argument
                opt.process(arg+equals+1);
        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();
        }
        else
                opt.process();
-       
+
        return 1;
 }
 
        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");
                {
                        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;
                        // Use the next argument as option argument
                        opt.process(argp[1]);
                        return 2;
@@ -310,12 +310,12 @@ 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());
        }
                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;
 }
 
 
        return result;
 }
 
 
-GetOpt::OptionImpl::OptionImpl(char s, const std::string &l, const Store &t, ArgType a):
+GetOpt::OptionImpl::OptionImpl(char s, const string &l, const Store &t, ArgType a):
        shrt(s),
        lng(l),
        arg_type(a),
        shrt(s),
        lng(l),
        arg_type(a),