X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8f0e4a34b2dd1c54f80d953f7337ac89047a2654..3a45cd9275dc9279e133deb0932402ae5f4d0b5f:/projects/stargazer/plugins/configuration/xrconfig/xrconfig.cpp diff --git a/projects/stargazer/plugins/configuration/xrconfig/xrconfig.cpp b/projects/stargazer/plugins/configuration/xrconfig/xrconfig.cpp index cb156eed..856ae886 100644 --- a/projects/stargazer/plugins/configuration/xrconfig/xrconfig.cpp +++ b/projects/stargazer/plugins/configuration/xrconfig/xrconfig.cpp @@ -44,41 +44,8 @@ const string & XR_CONFIG_SETTINGS::GetStrError() const return errorStr; } //----------------------------------------------------------------------------- -int XR_CONFIG_SETTINGS::ParseIntInRange(const string & str, int min, int max, int * val) -{ -if (strtoi2(str.c_str(), *val)) - { - errorStr = "Incorrect value \'" + str + "\'."; - return -1; - } -if (*val < min || *val > max) - { - errorStr = "Value \'" + str + "\' out of range."; - return -1; - } -return 0; -} -//----------------------------------------------------------------------------- int XR_CONFIG_SETTINGS::ParseSettings(const MODULE_SETTINGS & s) { -/*int p; -PARAM_VALUE pv; -vector::const_iterator pvi; - -pv.param = "Port"; -pvi = find(s.moduleParams.begin(), s.moduleParams.end(), pv); -if (pvi == s.moduleParams.end()) - { - errorStr = "Parameter \'Port\' not found."; - return -1; - } - -if (ParseIntInRange(pvi->value[0], 2, 65535, &p)) - { - errorStr = "Cannot parse parameter \'Port\': " + errorStr; - return -1; - } -port = p;*/ return 0; }