]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/getopt.cpp
Make sure all files have the correct header
[libs/core.git] / source / core / getopt.cpp
index 67c4d4171d1ada94d8077f461175c40878fed669..b8e24132b7718ad39f5e3ed63abff7635d1d260c 100644 (file)
@@ -10,6 +10,12 @@ using namespace std;
 
 namespace Msp {
 
+GetOpt::~GetOpt()
+{
+       for(list<OptBase *>::iterator i=opts.begin(); i!=opts.end(); ++i)
+               delete *i;
+}
+
 /**
 Generates a single line that gives an overview about the known options.
 
@@ -114,12 +120,6 @@ void GetOpt::operator()(unsigned argc, const char *const *argv)
                args.push_back(argv[i]);
 }
 
-GetOpt::~GetOpt()
-{
-       for(list<OptBase *>::iterator i=opts.begin(); i!=opts.end(); ++i)
-               delete *i;
-}
-
 GetOpt::OptBase &GetOpt::get_option(char s)
 {
        for(list<OptBase *>::iterator i=opts.begin(); i!=opts.end(); ++i)
@@ -150,7 +150,7 @@ unsigned GetOpt::process_long(const char *const *argp)
 
        // See if the argument contains an =
        unsigned equals=0;
-       for(; arg[equals] && arg[equals]!='='; ++equals);
+       for(; arg[equals] && arg[equals]!='='; ++equals) ;
        
        OptBase &opt=get_option(string(arg, equals));