mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
legacy: Now uses static initialization
This commit is contained in:
parent
7c5055de7a
commit
5b2328cd6c
1 changed files with 2 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue