Urgency: Add backwards compatible handling of next coefficient

This commit is contained in:
Tomas Babej 2015-09-02 22:50:57 +02:00 committed by Paul Beckingham
parent 6b83945a21
commit a08d354971

View file

@ -661,6 +661,11 @@ const int Config::getInteger (const std::string& key)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
const double Config::getReal (const std::string& key) const double Config::getReal (const std::string& key)
{ {
//NOTE: Backwards compatible handling of next coefficient.
//TODO: Remove.
if (key == "urgency.user.tag.next.coefficient" and has("urgency.next.coefficient"))
return getReal("urgency.next.coefficient");
if ((*this).find (key) != (*this).end ()) if ((*this).find (key) != (*this).end ())
return strtod ((*this)[key].c_str (), NULL); return strtod ((*this)[key].c_str (), NULL);