]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/getopt.h
Style and comment updates
[libs/core.git] / source / core / getopt.h
index bfa2ef2092feb82d62a0f9ced8655df48d67941e..56ab05123584ef83fcc51cd838802ef4a941c453 100644 (file)
@@ -65,6 +65,9 @@ private:
        template<typename T>
        class Option: public OptBase
        {
+       private:
+               T &data;
+
        public:
                Option(char s, const std::string &l, T &d, ArgType a): OptBase(s, l, a), data(d) { }
 
@@ -81,13 +84,14 @@ private:
                                throw usage_error("Invalid argument for --"+lng+" ("+e.what()+")");
                        }
                }
-       private:
-               T &data;
        };
 
        template<typename T>
        class ListOption: public OptBase
        {
+       private:
+               T &data;
+
        public:
                ListOption(char s, const std::string &l, T &d, ArgType a): OptBase(s, l, a), data(d)
                { if(arg_type!=REQUIRED_ARG) throw std::invalid_argument("ListOption arg_type!=REQUIRED"); }
@@ -105,8 +109,6 @@ private:
                                throw usage_error("Invalid argument for --"+lng+" ("+e.what()+")");
                        }
                }
-       private:
-               T &data;
        };
 
        bool help;