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

Unified Diff: mojo/public/cpp/bindings/array.h

Issue 1372233002: Fix |Array| and iterator_util.h's Iterator operator->() behavior (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | mojo/public/cpp/bindings/lib/iterator_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/array.h
diff --git a/mojo/public/cpp/bindings/array.h b/mojo/public/cpp/bindings/array.h
index e1efc1830cc7c025139b0b20b0e9b310c86a0f36..e765bb1a43eed4fb26ff53fcc346a7d5489dd840 100644
--- a/mojo/public/cpp/bindings/array.h
+++ b/mojo/public/cpp/bindings/array.h
@@ -197,7 +197,7 @@ class Array {
}
bool operator!=(const Iterator& o) const { return !(*this == o); }
RefType operator*() const { return arr_->at(pos_); }
- RefType operator->() const { return operator*(); }
+ T* operator->() const { return &arr_->at(pos_); }
// The following satisfy RandomAccessIterator:
Iterator& operator+=(difference_type dist) {
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/iterator_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698