X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d3b6a58593b94c9ff41c30a7517086d607f28f10..b9bafe1042839cd7295adf84448b4d08de9f5f46:/projects/sgconf/api_action.cpp diff --git a/projects/sgconf/api_action.cpp b/projects/sgconf/api_action.cpp index 420f5f0a..d5b1e8e6 100644 --- a/projects/sgconf/api_action.cpp +++ b/projects/sgconf/api_action.cpp @@ -3,7 +3,7 @@ #include "actions.h" #include "parser_state.h" -SGCONF::PARSER_STATE SGCONF::API_ACTION::Parse(int argc, char ** argv) +SGCONF::PARSER_STATE SGCONF::API_ACTION::Parse(int argc, char ** argv, void * /*data*/) { PARSER_STATE state(false, argc, argv); if (!m_argument.empty()) @@ -16,7 +16,7 @@ if (!m_argument.empty()) --state.argc; ++state.argv; } -m_suboptions.Parse(state.argc, state.argv); +state = m_suboptions.Parse(state.argc, state.argv, &m_params); m_commands.Add(m_funPtr, m_argument, m_params); return state; } @@ -34,7 +34,7 @@ SGCONF::API_ACTION::API_ACTION(COMMANDS & commands, std::vector::const_iterator it(params.begin()); while (it != params.end()) { - m_suboptions.Add(it->name, MakeKVAction(it->name, m_params, it->shortDescr), it->longDescr); + m_suboptions.Add(it->name, MakeKVAction(it->name, it->shortDescr), it->longDescr); ++it; } }