X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/46b0747592074017ff0ea4b33d4a7194235886e5..de9e44e256657beb5160021c7e4fd21d8a9a21d2:/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp diff --git a/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp b/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp index 9c752674..ae22cf04 100644 --- a/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp +++ b/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp @@ -51,7 +51,7 @@ std::string AOS2String(const A & array, size_t size, const F C::* field, F multi { if (!res.empty()) res += "/"; - res += x2str((array[i].*field) * multiplier); + res += std::to_string((array[i].*field) * multiplier); } return res; } @@ -90,17 +90,17 @@ void GET_TARIFFS::CreateAnswer() { m_answer = ""; - std::list dataList; + std::vector dataList; m_tariffs.GetTariffsData(&dataList); - std::list::const_iterator it = dataList.begin(); + auto it = dataList.begin(); for (; it != dataList.end(); ++it) { m_answer += "tariffConf.name + "\">"; for (size_t i = 0; i < DIR_NUM; i++) - m_answer += "dirPrice[i].hDay) + ":" + x2str(it->dirPrice[i].mDay) + "-" + - x2str(it->dirPrice[i].hNight) + ":" + x2str(it->dirPrice[i].mNight) + "\"/>"; + m_answer += "dirPrice[i].hDay) + ":" + std::to_string(it->dirPrice[i].mDay) + "-" + + std::to_string(it->dirPrice[i].hNight) + ":" + std::to_string(it->dirPrice[i].mNight) + "\"/>"; m_answer += "dirPrice, DIR_NUM, &DIRPRICE_DATA::priceDayA, pt_mega) + "\"/>" + "dirPrice, DIR_NUM, &DIRPRICE_DATA::priceDayB, pt_mega) + "\"/>" + @@ -109,13 +109,13 @@ void GET_TARIFFS::CreateAnswer() "dirPrice, DIR_NUM, &DIRPRICE_DATA::threshold, 1) + "\"/>" + "dirPrice, DIR_NUM, &DIRPRICE_DATA::singlePrice, 1) + "\"/>" + "dirPrice, DIR_NUM, &DIRPRICE_DATA::noDiscount, 1) + "\"/>" + - "tariffConf.fee) + "\"/>" + - "tariffConf.passiveCost) + "\"/>" + - "tariffConf.free) + "\"/>" + + "tariffConf.fee) + "\"/>" + + "tariffConf.passiveCost) + "\"/>" + + "tariffConf.free) + "\"/>" + "tariffConf.traffType) + "\"/>" + "tariffConf.period) + "\"/>" + "tariffConf.changePolicy) + "\"/>" + - "tariffConf.changePolicyTimeout) + "\"/>" + + "tariffConf.changePolicyTimeout) + "\"/>" + ""; }