git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ticket 12. The stopOnError variable moved, GetStopOnError() method
[stg.git]
/
stglibs
/
srvconf.lib
/
parsers
/
get_tariff.cpp
diff --git
a/stglibs/srvconf.lib/parsers/get_tariff.cpp
b/stglibs/srvconf.lib/parsers/get_tariff.cpp
index c0736b7b4053f917e1384ce67197f1b378a8f4ec..0804b269ac3d8980ae20b33b84c6d0375e3750d8 100644
(file)
--- a/
stglibs/srvconf.lib/parsers/get_tariff.cpp
+++ b/
stglibs/srvconf.lib/parsers/get_tariff.cpp
@@
-78,17
+78,7
@@
bool GetTraffType(const char ** attr, T & value, const std::string & attrName)
{
if (!CheckValue(attr, attrName))
return false;
{
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;
}
return true;
}