- Relocated legacy checks from Config.cpp to legacy.cpp.
This commit is contained in:
Paul Beckingham
2011-10-02 18:05:20 -04:00
parent d62ea4e223
commit 6e21cc5b2a
5 changed files with 73 additions and 71 deletions

View File

@@ -696,69 +696,3 @@ void Config::all (std::vector<std::string>& items) const
}
////////////////////////////////////////////////////////////////////////////////
std::string Config::checkForDeprecatedColor ()
{
std::vector <std::string> deprecated;
std::map <std::string, std::string>::const_iterator it;
for (it = this->begin (); it != this->end (); ++it)
{
if (it->first.find ("color.") != std::string::npos)
{
std::string value = get (it->first);
if (value.find ("_") != std::string::npos)
deprecated.push_back (it->first);
}
}
std::stringstream out;
if (deprecated.size ())
{
out << STRING_CONFIG_DEPRECATED_US
<< "\n";
std::vector <std::string>::iterator it2;
for (it2 = deprecated.begin (); it2 != deprecated.end (); ++it2)
out << " " << *it2 << "=" << get (*it2) << "\n";
out << "\n";
}
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////
std::string Config::checkForDeprecatedColumns ()
{
std::vector <std::string> deprecated;
std::map <std::string, std::string>::const_iterator it;
for (it = this->begin (); it != this->end (); ++it)
{
if (it->first.find ("report") == 0)
{
std::string value = get (it->first);
if (value.find ("entry_time") != std::string::npos ||
value.find ("start_time") != std::string::npos ||
value.find ("end_time") != std::string::npos)
deprecated.push_back (it->first);
}
}
std::stringstream out;
out << "\n";
if (deprecated.size ())
{
out << STRING_CONFIG_DEPRECATED_COL
<< "\n";
std::vector <std::string>::iterator it2;
for (it2 = deprecated.begin (); it2 != deprecated.end (); ++it2)
out << " " << *it2 << "=" << get (*it2) << "\n";
out << "\n";
}
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////