legacy: Now uses static initialization

This commit is contained in:
Paul Beckingham 2015-11-01 23:03:38 -05:00
parent 7c5055de7a
commit 5b2328cd6c

View file

@ -50,11 +50,7 @@ void legacyColumnMap (std::string& name)
// 2014-01-26: description_only --> description.desc Mapping removed
// One-time initialization, on demand.
static std::map <std::string, std::string> legacyMap;
if (! legacyMap.size ())
{
legacyMap["priority."] = "priority";
}
static std::map <std::string, std::string> legacyMap {{"priority.", "priority"}};
// If a legacy column was used, complain about it, but modify it anyway.
auto found = legacyMap.find (name);
@ -82,11 +78,7 @@ void legacySortColumnMap (std::string& name)
// 2014-01-26: description_only --> description Mapping removed
// One-time initialization, on demand.
static std::map <std::string, std::string> legacyMap;
if (! legacyMap.size ())
{
legacyMap["priority."] = "priority";
}
static std::map <std::string, std::string> legacyMap {{"priority.", "priority"}};
// If a legacy column was used, complain about it, but modify it anyway.
auto found = legacyMap.find (name);