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

Unified Diff: base/observer_list.h

Issue 2137183003: Add support for dependent types in FOR_EACH_OBSERVER (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/observer_list.h
diff --git a/base/observer_list.h b/base/observer_list.h
index 31564212e05f15262af24a3b2d07bd026055fa32..afe1f46cd6e31bfaa0456cec8614fd73f3cd0e1e 100644
--- a/base/observer_list.h
+++ b/base/observer_list.h
@@ -236,8 +236,8 @@ class ObserverList : public ObserverListBase<ObserverType> {
#define FOR_EACH_OBSERVER(ObserverType, observer_list, func) \
do { \
if ((observer_list).might_have_observers()) { \
- base::ObserverListBase<ObserverType>::Iterator it_inside_observer_macro( \
- &observer_list); \
+ typename base::ObserverListBase<ObserverType>::Iterator \
+ it_inside_observer_macro(&observer_list); \
ObserverType* obs; \
while ((obs = it_inside_observer_macro.GetNext()) != nullptr) \
obs->func; \
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698