From 2840c5f9dfb72a1756581f238d3476a0f96067f6 Mon Sep 17 00:00:00 2001 From: randomdan Date: Tue, 20 Dec 2011 16:43:00 +0000 Subject: Store options set name Fix error in default CGI output options settings --- project2/cgi/cgiOutputOptions.cpp | 10 +++++----- project2/common/options.cpp | 3 ++- project2/common/options.h | 3 +++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/project2/cgi/cgiOutputOptions.cpp b/project2/cgi/cgiOutputOptions.cpp index f9a6d86..e18a0b8 100644 --- a/project2/cgi/cgiOutputOptions.cpp +++ b/project2/cgi/cgiOutputOptions.cpp @@ -23,11 +23,11 @@ OutputOptionsLoader::OutputOptionsLoader() : { opts ("cgi.output.core", Options::value(&OutputOptions::core, true), "Core messages") - ("cgi.output.session", Options::value(&OutputOptions::core, true), "Session values") - ("cgi.output.timing", Options::value(&OutputOptions::core, true), "Timing") - ("cgi.output.environment", Options::value(&OutputOptions::core, true), "Environment") - ("cgi.output.url", Options::value(&OutputOptions::core, true), "URL breakdown") - ("cgi.output.parameters", Options::value(&OutputOptions::core, true), "Parameters") + ("cgi.output.session", Options::value(&OutputOptions::session, true), "Session values") + ("cgi.output.timing", Options::value(&OutputOptions::timing, true), "Timing") + ("cgi.output.environment", Options::value(&OutputOptions::environment, true), "Environment") + ("cgi.output.url", Options::value(&OutputOptions::url, true), "URL breakdown") + ("cgi.output.parameters", Options::value(&OutputOptions::parameters, true), "Parameters") ; } diff --git a/project2/common/options.cpp b/project2/common/options.cpp index 8ff7f55..767fb3b 100644 --- a/project2/common/options.cpp +++ b/project2/common/options.cpp @@ -68,7 +68,8 @@ class OptionAlias : public Options::Option { const NamedOption * target; }; -Options::Options(Glib::ustring const&) +Options::Options(Glib::ustring const & n) : + name(n) { } diff --git a/project2/common/options.h b/project2/common/options.h index 207848a..b4cbaf8 100644 --- a/project2/common/options.h +++ b/project2/common/options.h @@ -110,6 +110,9 @@ class Options { void reset() const; void consume(const Glib::ustring & name, const Glib::ustring & platform, const Glib::ustring & value) const; const Option * find(const Glib::ustring & name) const; + + const Glib::ustring name; + private: typedef std::list OptionList; OptionList options; -- cgit v1.2.3