X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/13741f69c1ea01b5d513ad1eadbdd0a1bc49a9bb..9c340da9ffa670c20c3658a2be43d35868a9f5d9:/projects/sgauthstress/settings.cpp diff --git a/projects/sgauthstress/settings.cpp b/projects/sgauthstress/settings.cpp index 1e1cf1a0..2e0f8e0a 100644 --- a/projects/sgauthstress/settings.cpp +++ b/projects/sgauthstress/settings.cpp @@ -15,7 +15,7 @@ */ /* - * Author : Maxim Mamontov + * Author : Maksym Mamontov */ #include @@ -35,60 +35,6 @@ SETTINGS::SETTINGS() { } //----------------------------------------------------------------------------- -int ParseYesNo(const std::string & value, bool * val) -{ -if (0 == strcasecmp(value.c_str(), "yes")) - { - *val = true; - return 0; - } -if (0 == strcasecmp(value.c_str(), "no")) - { - *val = false; - return 0; - } - -return -1; -} -//----------------------------------------------------------------------------- -int ParseInt(const std::string & value, int * val) -{ -if (str2x(value, *val)) - return -1; - -return 0; -} -//----------------------------------------------------------------------------- -int ParseUnsigned(const std::string & value, unsigned * val) -{ -if (str2x(value, *val)) - return -1; - -return 0; -} -//----------------------------------------------------------------------------- -int ParseIntInRange(const std::string & value, int min, int max, int * val) -{ -if (ParseInt(value, val) != 0) - return -1; - -if (*val < min || *val > max) - return -1; - -return 0; -} -//----------------------------------------------------------------------------- -int ParseUnsignedInRange(const std::string & value, unsigned min, unsigned max, unsigned * val) -{ -if (ParseUnsigned(value, val) != 0) - return -1; - -if (*val < min || *val > max) - return -1; - -return 0; -} -//----------------------------------------------------------------------------- int ParseModuleSettings(const DOTCONFDocumentNode * node, std::vector * params) { assert(node && "DOTCONFDocumentNode must not be NULL!");