legacy: Now uses static initialization
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user