Task: Remove std::map inheritance, clean up interface
- Make the Task object's interface more explicit by removing the std::map inheritance. - Using this more explicit interface, remove unneeded ctors in order to allow the compiler to "Do The Right Thing"(tm). This leads to a performance improvement of 12% in the "add" performance test, and 7% for "import".
This commit is contained in:
@@ -192,7 +192,7 @@ static void colorizeKeyword (Task& task, const std::string& rule, const Color& b
|
||||
// first match.
|
||||
else
|
||||
{
|
||||
for (auto& it : task)
|
||||
for (auto& it : task.data)
|
||||
{
|
||||
if (! it.first.compare (0, 11, "annotation_", 11) &&
|
||||
find (it.second, rule.substr (14), sensitive) != std::string::npos)
|
||||
|
||||
Reference in New Issue
Block a user