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

Unified Diff: base/message_loop/message_loop.h

Issue 1467003002: Switch to static_assert in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: / Created 5 years, 1 month 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 | « base/memory/weak_ptr.h ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.h
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 77edfdb1331c0b83b095b06962a45dd261faa9d1..6e4be9dc6964befb22000d23be2b039758e0a250 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -601,8 +601,8 @@ class BASE_EXPORT MessageLoopForUI : public MessageLoop {
// Do not add any member variables to MessageLoopForUI! This is important b/c
// MessageLoopForUI is often allocated via MessageLoop(TYPE_UI). Any extra
// data that you need should be stored on the MessageLoop's pump_ instance.
-COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForUI),
- MessageLoopForUI_should_not_have_extra_member_variables);
+static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForUI),
+ "MessageLoopForUI should not have extra member variables");
#endif // !defined(OS_NACL)
@@ -682,8 +682,8 @@ class BASE_EXPORT MessageLoopForIO : public MessageLoop {
// Do not add any member variables to MessageLoopForIO! This is important b/c
// MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra
// data that you need should be stored on the MessageLoop's pump_ instance.
-COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO),
- MessageLoopForIO_should_not_have_extra_member_variables);
+static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForIO),
+ "MessageLoopForIO should not have extra member variables");
} // namespace base
« no previous file with comments | « base/memory/weak_ptr.h ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698