| Index: cc/layer_impl.cc
|
| diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
|
| index 4927e7484d5040e6064261f47d6d179104a7c6c5..237d20cdc5a7979872537442d69d5d6c0ccae409 100644
|
| --- a/cc/layer_impl.cc
|
| +++ b/cc/layer_impl.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "cc/layer_impl.h"
|
|
|
| +#include <algorithm>
|
| +
|
| #include "base/debug/trace_event.h"
|
| #include "base/stringprintf.h"
|
| #include "cc/debug_border_draw_quad.h"
|
| @@ -76,7 +78,7 @@ LayerImpl::~LayerImpl()
|
| void LayerImpl::addChild(scoped_ptr<LayerImpl> child)
|
| {
|
| child->setParent(this);
|
| - m_children.append(child.Pass());
|
| + m_children.push_back(child.Pass());
|
| }
|
|
|
| void LayerImpl::removeFromParent()
|
| @@ -87,18 +89,13 @@ void LayerImpl::removeFromParent()
|
| LayerImpl* parent = m_parent;
|
| m_parent = 0;
|
|
|
| - for (size_t i = 0; i < parent->m_children.size(); ++i) {
|
| - if (parent->m_children[i] == this) {
|
| - parent->m_children.remove(i);
|
| - return;
|
| - }
|
| - }
|
| + parent->m_children.erase(std::find(parent->m_children.begin(), parent->m_children.end(), this));
|
| }
|
|
|
| void LayerImpl::removeAllChildren()
|
| {
|
| while (m_children.size())
|
| - m_children[0]->removeFromParent();
|
| + m_children.front()->removeFromParent();
|
| }
|
|
|
| void LayerImpl::clearChildList()
|
|
|