From c6860970f27ed1f0d9b9543da46ffffa5c20e8f6 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 24 Aug 2004 20:01:51 -0400 Subject: removed all uses of std::vector; simplified some code --- option.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'option.h') diff --git a/option.h b/option.h index 9952d7d5..a0f1e418 100644 --- a/option.h +++ b/option.h @@ -3,7 +3,6 @@ #include #include -#include #include struct option_handler; @@ -23,8 +22,8 @@ typedef std::pair option_handler_pair; struct option_handler { bool handled; - static std::vector options; - static option_handler_map handlers; + static std::list 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& args); void process_environment(char ** envp, const std::string& tag); -#define DEF_OPT_HANDLERS() \ - std::vector option_handler::options; \ - option_handler_map option_handler::handlers +#define DEF_OPT_HANDLERS() \ + std::list option_handler::options; \ + option_handler_map option_handler::handlers #define OPT_BEGIN(tag, chars) \ static struct opt_ ## tag ## _handler : public option_handler { \ -- cgit v1.2.3