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

Unified Diff: ui/aura/window_property.h

Issue 828633002: replace COMPILE_ASSERT with static_assert in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix for rebase 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 | ui/aura/window_tree_host_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_property.h
diff --git a/ui/aura/window_property.h b/ui/aura/window_property.h
index 0755c589bc36c1bcb113f517b4f25674136b87b8..3cc981c9d988bdc02e2c00f80f3480931dd5eed1 100644
--- a/ui/aura/window_property.h
+++ b/ui/aura/window_property.h
@@ -129,26 +129,26 @@ class AURA_EXPORT PropertyHelper {
DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(, T)
#define DEFINE_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
- COMPILE_ASSERT(sizeof(TYPE) <= sizeof(int64), property_type_too_large); \
- namespace { \
- const aura::WindowProperty<TYPE> NAME ## _Value = \
- {DEFAULT, #NAME, nullptr}; \
- } \
+ static_assert(sizeof(TYPE) <= sizeof(int64), "property type too large"); \
+ namespace { \
+ const aura::WindowProperty<TYPE> NAME ## _Value = \
+ {DEFAULT, #NAME, nullptr}; \
+ } \
const aura::WindowProperty<TYPE>* const NAME = & NAME ## _Value;
#define DEFINE_LOCAL_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
- COMPILE_ASSERT(sizeof(TYPE) <= sizeof(int64), property_type_too_large); \
- namespace { \
- const aura::WindowProperty<TYPE> NAME ## _Value = \
- {DEFAULT, #NAME, nullptr}; \
- const aura::WindowProperty<TYPE>* const NAME = & NAME ## _Value; \
+ static_assert(sizeof(TYPE) <= sizeof(int64), "property type too large"); \
+ namespace { \
+ const aura::WindowProperty<TYPE> NAME ## _Value = \
+ {DEFAULT, #NAME, nullptr}; \
+ const aura::WindowProperty<TYPE>* const NAME = & NAME ## _Value; \
}
#define DEFINE_OWNED_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
namespace { \
void Deallocator ## NAME (int64 p) { \
enum { type_must_be_complete = sizeof(TYPE) }; \
- delete aura::WindowPropertyCaster<TYPE*>::FromInt64(p); \
+ delete aura::WindowPropertyCaster<TYPE*>::FromInt64(p); \
} \
const aura::WindowProperty<TYPE*> NAME ## _Value = \
{DEFAULT,#NAME,&Deallocator ## NAME}; \
« no previous file with comments | « no previous file | ui/aura/window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698