X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/7766e753fefb962209f1898a234053f8c7bbe59d..f7795445d9e0dd2282b336c89ebe117a2b71a88e:/projects/sgconf/main.cpp diff --git a/projects/sgconf/main.cpp b/projects/sgconf/main.cpp index 73917852..22e998f3 100644 --- a/projects/sgconf/main.cpp +++ b/projects/sgconf/main.cpp @@ -163,7 +163,7 @@ class CONFIG_ACTION : public ACTION virtual std::string ParamDescription() const { return m_description; } virtual std::string DefaultDescription() const { return ""; } virtual OPTION_BLOCK & Suboptions() { return m_suboptions; } - virtual PARSER_STATE Parse(int argc, char ** argv); + virtual PARSER_STATE Parse(int argc, char ** argv, void * /*data*/); private: SGCONF::CONFIG & m_config; @@ -175,7 +175,7 @@ class CONFIG_ACTION : public ACTION }; -PARSER_STATE CONFIG_ACTION::Parse(int argc, char ** argv) +PARSER_STATE CONFIG_ACTION::Parse(int argc, char ** argv, void * /*data*/) { if (argc == 0 || argv == NULL || @@ -298,15 +298,15 @@ else } config = configOverride; + +std::cerr << "Config: " << config.Serialize() << std::endl; +return commands.Execute(config) ? 0 : -1; } catch (const std::exception& ex) { std::cerr << ex.what() << "\n"; return -1; } - -std::cerr << "Config: " << config.Serialize() << std::endl; -return commands.Execute(config) ? 0 : -1; } //-----------------------------------------------------------------------------