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

Unified Diff: include/core/SkOnce.h

Issue 806473006: namespace {} trick for SK_DECLARE_STATIC_ONCE (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | src/ports/SkGlobalInitialization_chromium.cpp » ('j') | src/utils/win/SkDWrite.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkOnce.h
diff --git a/include/core/SkOnce.h b/include/core/SkOnce.h
index 87bb277800e7d1ba89d808781be7231a12dd4dd3..f025cc2abf8db5d282ac02e6d80f3a015faedc81 100644
--- a/include/core/SkOnce.h
+++ b/include/core/SkOnce.h
@@ -31,8 +31,8 @@
#include "SkThread.h"
#include "SkTypes.h"
-// This must be used in a global or function scope, not as a class member.
-#define SK_DECLARE_STATIC_ONCE(name) static SkOnceFlag name
+// This must be used in a global scope, not in fuction scope or as a class member.
+#define SK_DECLARE_STATIC_ONCE(name) namespace {} static SkOnceFlag name
class SkOnceFlag;
« no previous file with comments | « no previous file | src/ports/SkGlobalInitialization_chromium.cpp » ('j') | src/utils/win/SkDWrite.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698