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:
@@ -189,7 +189,7 @@ TODO Task::decode
|
||||
test.is (task.get ("three"), "four", "three=four");
|
||||
|
||||
// Task::set
|
||||
task.clear ();
|
||||
task.data.clear ();
|
||||
task.set ("name", "value");
|
||||
test.is (task.composeF4 (), "[name:\"value\"]", "Task::set");
|
||||
|
||||
@@ -213,7 +213,7 @@ TODO Task::decode
|
||||
test.is (task.composeF4 (), "[name:\"value\"]", "Task::remove");
|
||||
|
||||
// Task::all
|
||||
test.is (task.size (), (size_t)1, "Task::all size");
|
||||
test.is (task.data.size (), (size_t)1, "Task::all size");
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user