diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-11 20:59:37 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-11 20:59:37 +0000 |
commit | e640c616c37885ebe84714ba7a2dbd875ace7c26 (patch) | |
tree | c9d3bbc3284b6e5f2ecc1f548eebdb2c50506ece /ui | |
parent | 87f36376c871d6b53913b54029afa617f683b986 (diff) | |
download | chromium_src-e640c616c37885ebe84714ba7a2dbd875ace7c26.zip chromium_src-e640c616c37885ebe84714ba7a2dbd875ace7c26.tar.gz chromium_src-e640c616c37885ebe84714ba7a2dbd875ace7c26.tar.bz2 |
ui/base/models: Use operator '->' for accessing std::vector elements in TreeNode class.
Otherwise we are not being consistent with the rest of the file.
TEST=ui_unittests --gtest_filter=TreeNodeModelTest.*
R=sky@chromium.org
Review URL: http://codereview.chromium.org/8511065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/base/models/tree_node_model.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/base/models/tree_node_model.h b/ui/base/models/tree_node_model.h index 38062a3..1fe59d9 100644 --- a/ui/base/models/tree_node_model.h +++ b/ui/base/models/tree_node_model.h @@ -71,12 +71,12 @@ class TreeNode : public TreeModelNode { virtual ~TreeNode() {} - // Adds |node| as a child of this one, at |index|. + // Adds |node| as a child of this node, at |index|. virtual void Add(NodeType* node, int index) { DCHECK(node); DCHECK_GE(index, 0); DCHECK_LE(index, child_count()); - // If the node has a parent, remove it from its parent. + // If |node| has a parent, remove it from its parent. NodeType* parent = node->parent_; if (parent) parent->Remove(node); @@ -89,7 +89,7 @@ class TreeNode : public TreeModelNode { virtual NodeType* Remove(NodeType* node) { typename std::vector<NodeType*>::iterator i = std::find(children_->begin(), children_->end(), node); - DCHECK(i != children_.end()); + DCHECK(i != children_->end()); node->parent_ = NULL; children_->erase(i); return node; @@ -113,7 +113,7 @@ class TreeNode : public TreeModelNode { int child_count() const { return static_cast<int>(children_->size()); } // Returns true if this node has no children. - bool empty() const { return children_.empty(); } + bool empty() const { return children_->empty(); } // Returns the number of all nodes in the subtree rooted at this node, // including this node. |