Improve API and documentation of tree models.
Converts TreeNodeModel to allow an index-based removal for cases where an index is known. This prevents a linear search in that case. A pass-through function is provided that does the search if the index is not known. This requires a similar change in TreeNode. TreeNode::Add and ::Remove used to be virtual but these were never overridden. They are changed to non-virtual member functions. Additional documentation is added referencing TreeNodeModel from TreeModel, and some additional examples are provided. Change-Id: I5c062420bada437f1ef127ce80518e37f5c2aaae Reviewed-on: https://chromium-review.googlesource.com/820671 Commit-Queue: Brett Wilson <brettw@chromium.org> Reviewed-by:Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#523591}
Showing
Please register or sign in to comment