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

Unified Diff: base/observer_list.h

Issue 23672052: Fix possible naming conflict in macro. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Name change Created 7 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 | 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 b44e33f56c73f4e2a749436a13be8241518a307d..bd1dc64055b4df3af4eeb9441e35afd02e109e39 100644
--- a/base/observer_list.h
+++ b/base/observer_list.h
@@ -203,14 +203,15 @@ class ObserverList : public ObserverListBase<ObserverType> {
}
};
-#define FOR_EACH_OBSERVER(ObserverType, observer_list, func) \
- do { \
- if ((observer_list).might_have_observers()) { \
- ObserverListBase<ObserverType>::Iterator it(observer_list); \
- ObserverType* obs; \
- while ((obs = it.GetNext()) != NULL) \
- obs->func; \
- } \
+#define FOR_EACH_OBSERVER(ObserverType, observer_list, func) \
+ do { \
+ if ((observer_list).might_have_observers()) { \
+ ObserverListBase<ObserverType>::Iterator \
+ it_inside_observer_macro(observer_list); \
+ ObserverType* obs; \
+ while ((obs = it_inside_observer_macro.GetNext()) != NULL) \
+ obs->func; \
+ } \
} while (0)
#endif // BASE_OBSERVER_LIST_H__
« 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