X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/46b0747592074017ff0ea4b33d4a7194235886e5..80aca6d78d4ff5d514216fe96c44e2ee75c4e933:/libs/srvconf/parsers/chg_service.cpp diff --git a/libs/srvconf/parsers/chg_service.cpp b/libs/srvconf/parsers/chg_service.cpp index 6bea7565..977af49c 100644 --- a/libs/srvconf/parsers/chg_service.cpp +++ b/libs/srvconf/parsers/chg_service.cpp @@ -20,7 +20,7 @@ #include "chg_service.h" -#include "resetable_utils.h" +#include "optional_utils.h" #include "stg/service_conf.h" #include "stg/common.h" @@ -29,14 +29,12 @@ using namespace STG; -std::string CHG_SERVICE::Serialize(const SERVICE_CONF_RES & conf, const std::string & /*encoding*/) +std::string ChgService::serialize(const ServiceConfOpt& conf, const std::string& /*encoding*/) { -std::ostringstream stream; - -appendResetableAttr(stream, "name", conf.name); -appendResetableAttr(stream, "comment", MaybeEncode(conf.comment)); -appendResetableAttr(stream, "cost", conf.cost); -appendResetableAttr(stream, "payDay", conf.payDay); - -return stream.str(); + std::ostringstream stream; + appendResetableAttr(stream, "name", conf.name); + appendResetableAttr(stream, "comment", maybeEncode(conf.comment)); + appendResetableAttr(stream, "cost", conf.cost); + appendResetableAttr(stream, "payDay", conf.payDay); + return stream.str(); }