Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Unified Diff: cc/trees/property_tree.h

Issue 2070283002: Use container::back() and container::pop_back(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface_manager.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree.h
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h
index 4dbf6c4642db794052fe95cef923ecfe33f08eff..b00d090a3d863eb43bbd2946455cf70dc4cc4cf9 100644
--- a/cc/trees/property_tree.h
+++ b/cc/trees/property_tree.h
@@ -85,10 +85,8 @@ class CC_EXPORT PropertyTree {
T* parent(const T* t) { return Node(t->parent_id); }
const T* parent(const T* t) const { return Node(t->parent_id); }
- T* back() { return size() ? &nodes_[nodes_.size() - 1] : nullptr; }
- const T* back() const {
- return size() ? &nodes_[nodes_.size() - 1] : nullptr;
- }
+ T* back() { return size() ? &nodes_.back() : nullptr; }
+ const T* back() const { return size() ? &nodes_.back() : nullptr; }
void clear();
size_t size() const { return nodes_.size(); }
« no previous file with comments | « cc/surfaces/surface_manager.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698