X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a500fb72810060e52d87ad2c2e4691531f0bcc5a..8c7a6befad791ac242f15233365893b18953a627:/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp?ds=sidebyside diff --git a/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp b/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp index 3ed22113..e22c78fe 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp @@ -23,8 +23,8 @@ #include "stg/tariffs.h" #include "stg/users.h" -#include "stg/optional.h" +#include #include // snprintf #include @@ -57,7 +57,7 @@ std::string AOS2String(const A & array, size_t size, const F C::* field, F multi } template -bool str2res(const std::string& source, STG::Optional& dest, T divisor) +bool str2res(const std::string& source, std::optional& dest, T divisor) { T value = 0; if (str2x(source, value)) @@ -67,7 +67,7 @@ bool str2res(const std::string& source, STG::Optional& dest, T divisor) } template -bool String2AOS(const std::string & source, A & array, size_t size, STG::Optional C::* field, F divisor) +bool String2AOS(const std::string & source, A & array, size_t size, std::optional C::* field, F divisor) { size_t index = 0; std::string::size_type from = 0; @@ -314,7 +314,7 @@ int CHG_TARIFF::Start(void *, const char * el, const char ** attr) void CHG_TARIFF::CreateAnswer() { - if (!td.tariffConf.name.data().empty()) + if (!td.tariffConf.name.value().empty()) { auto tariffData = td.get({}); if (m_tariffs.Chg(tariffData, &m_currAdmin) == 0)