| Index: cc/base/rtree.h
|
| diff --git a/cc/base/rtree.h b/cc/base/rtree.h
|
| index 3a19c29ac3d4545fad75b15e5b4918ccda113e50..679bc84516ae982be750a894bf75d01f239f00b7 100644
|
| --- a/cc/base/rtree.h
|
| +++ b/cc/base/rtree.h
|
| @@ -52,10 +52,7 @@ class CC_BASE_EXPORT RTree {
|
| if (bounds.IsEmpty())
|
| continue;
|
|
|
| - branches.push_back(Branch());
|
| - Branch& branch = branches.back();
|
| - branch.bounds = bounds;
|
| - branch.index = i;
|
| + branches.emplace_back(i, bounds);
|
| }
|
|
|
| num_data_elements_ = branches.size();
|
| @@ -115,12 +112,18 @@ class CC_BASE_EXPORT RTree {
|
| size_t index;
|
| };
|
| gfx::Rect bounds;
|
| +
|
| + Branch() {}
|
| + Branch(size_t index, const gfx::Rect& bounds)
|
| + : index(index), bounds(bounds) {}
|
| };
|
|
|
| struct Node {
|
| uint16_t num_children;
|
| uint16_t level;
|
| Branch children[kMaxChildren];
|
| +
|
| + explicit Node(uint16_t level) : num_children(0), level(level) {}
|
| };
|
|
|
| void SearchRecursive(Node* root,
|
|
|