X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/abe068d00ecc304c855886f5e511b563b352dd0a..5bc2f12466290605b1c073bc1741b17b175743b8:/stglibs/srvconf.lib/parsers/get_users.cpp?ds=sidebyside diff --git a/stglibs/srvconf.lib/parsers/get_users.cpp b/stglibs/srvconf.lib/parsers/get_users.cpp index cf62f357..6c385b0c 100644 --- a/stglibs/srvconf.lib/parsers/get_users.cpp +++ b/stglibs/srvconf.lib/parsers/get_users.cpp @@ -21,19 +21,17 @@ #include "get_users.h" -#include - #include using namespace STG; -GET_USERS::PARSER::PARSER() - : callback(NULL), - data(NULL), +GET_USERS::PARSER::PARSER(CALLBACK f, void * d) + : callback(f), + data(d), + userParser(&GET_USERS::PARSER::UserCallback, this), depth(0), parsingAnswer(false) { - userParser.SetCallback(&GET_USERS::PARSER::UserCallback, this); } //----------------------------------------------------------------------------- int GET_USERS::PARSER::ParseStart(const char * el, const char ** attr) @@ -69,12 +67,6 @@ void GET_USERS::PARSER::AddUser(const GET_USER::INFO & userInfo) info.push_back(userInfo); } //----------------------------------------------------------------------------- -void GET_USERS::PARSER::SetCallback(CALLBACK f, void * d) -{ -callback = f; -data = d; -} -//----------------------------------------------------------------------------- void GET_USERS::PARSER::UserCallback(bool result, const std::string & error, const GET_USER::INFO & info, void * data) { GET_USERS::PARSER * parser = static_cast(data);