X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/0e1a152a317a37c709c2b360a55023995b516cd8..5285ad2ffd2d77ea629bfc5ea1522dc65799f95e:/projects/stargazer/plugins/store/mysql/mysql_store.cpp diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp index 1e4c235d..6b16a99d 100644 --- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp +++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp @@ -111,28 +111,23 @@ return msc.GetPlugin(); } //----------------------------------------------------------------------------- MYSQL_STORE_SETTINGS::MYSQL_STORE_SETTINGS() - : settings(NULL), - errorStr(), - dbUser(), - dbPass(), - dbName(), - dbHost() + : settings(NULL) { } //----------------------------------------------------------------------------- -int MYSQL_STORE_SETTINGS::ParseParam(const std::vector & moduleParams, - const std::string & name, std::string & result) +int MYSQL_STORE_SETTINGS::ParseParam(const std::vector & moduleParams, + const std::string & name, std::string & result) { PARAM_VALUE pv; pv.param = name; std::vector::const_iterator pvi; pvi = find(moduleParams.begin(), moduleParams.end(), pv); -if (pvi == moduleParams.end()) +if (pvi == moduleParams.end() || pvi->value.empty()) { errorStr = "Parameter \'" + name + "\' not found."; return -1; } - + result = pvi->value[0]; return 0; @@ -159,10 +154,7 @@ return 0; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- MYSQL_STORE::MYSQL_STORE() - : errorStr(), - version("mysql_store v.0.67"), - storeSettings(), - settings(), + : version("mysql_store v.0.67"), schemaVersion(0), logger(GetPluginLogger(GetStgLogger(), "store_mysql")) {