]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/parsers/get_tariff.cpp
Fixes due to changes in API.
[stg.git] / stglibs / srvconf.lib / parsers / get_tariff.cpp
index c0736b7b4053f917e1384ce67197f1b378a8f4ec..0804b269ac3d8980ae20b33b84c6d0375e3750d8 100644 (file)
@@ -78,17 +78,7 @@ bool GetTraffType(const char ** attr, T & value, const std::string & attrName)
 {
 if (!CheckValue(attr, attrName))
     return false;
-std::string type(attr[1]);
-if (type == "up")
-    value = TRAFF_UP;
-else if (type == "down")
-    value = TRAFF_DOWN;
-else if (type == "up+down")
-    value = TRAFF_UP_DOWN;
-else if (type == "max")
-    value = TRAFF_MAX;
-else
-    return false;
+value = TARIFF::StringToTraffType(attr[1]);
 return true;
 }