summaryrefslogtreecommitdiff
path: root/option.h
diff options
context:
space:
mode:
Diffstat (limited to 'option.h')
-rw-r--r--option.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/option.h b/option.h
index 9952d7d5..a0f1e418 100644
--- a/option.h
+++ b/option.h
@@ -3,7 +3,6 @@
#include <map>
#include <list>
-#include <vector>
#include <string>
struct option_handler;
@@ -23,8 +22,8 @@ typedef std::pair<const std::string, option_handler *> option_handler_pair;
struct option_handler {
bool handled;
- static std::vector<option_t> options;
- static option_handler_map handlers;
+ static std::list<option_t> options;
+ static option_handler_map handlers;
option_handler(const std::string& label,
const std::string& opt_chars);
@@ -37,9 +36,9 @@ void process_arguments(int argc, char ** argv, const bool anywhere,
std::list<std::string>& args);
void process_environment(char ** envp, const std::string& tag);
-#define DEF_OPT_HANDLERS() \
- std::vector<option_t> option_handler::options; \
- option_handler_map option_handler::handlers
+#define DEF_OPT_HANDLERS() \
+ std::list<option_t> option_handler::options; \
+ option_handler_map option_handler::handlers
#define OPT_BEGIN(tag, chars) \
static struct opt_ ## tag ## _handler : public option_handler { \