Index: components/mus/public/cpp/window_property.h |
diff --git a/components/mus/public/cpp/window_property.h b/components/mus/public/cpp/window_property.h |
index cd5dd2b508a42c768f5f035326ddad0e61ddcafa..ab7fdaf70aa3f4259af22ba34c0a697a96bd6745 100644 |
--- a/components/mus/public/cpp/window_property.h |
+++ b/components/mus/public/cpp/window_property.h |
@@ -128,18 +128,18 @@ void Window::ClearLocalProperty(const WindowProperty<T>* property) { |
#define DECLARE_WINDOW_PROPERTY_TYPE(T) \ |
DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(, T) |
-#define DEFINE_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \ |
- COMPILE_ASSERT(sizeof(TYPE) <= sizeof(int64_t), property_type_too_large); \ |
- namespace { \ |
- const mus::WindowProperty<TYPE> NAME##_Value = {DEFAULT, #NAME, nullptr}; \ |
- } \ |
+#define DEFINE_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \ |
+ static_assert(sizeof(TYPE) <= sizeof(int64_t), "property_type_too_large"); \ |
+ namespace { \ |
+ const mus::WindowProperty<TYPE> NAME##_Value = {DEFAULT, #NAME, nullptr}; \ |
+ } \ |
const mus::WindowProperty<TYPE>* const NAME = &NAME##_Value; |
-#define DEFINE_LOCAL_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \ |
- COMPILE_ASSERT(sizeof(TYPE) <= sizeof(int64_t), property_type_too_large); \ |
- namespace { \ |
- const mus::WindowProperty<TYPE> NAME##_Value = {DEFAULT, #NAME, nullptr}; \ |
- const mus::WindowProperty<TYPE>* const NAME = &NAME##_Value; \ |
+#define DEFINE_LOCAL_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \ |
+ static_assert(sizeof(TYPE) <= sizeof(int64_t), "property_type_too_large"); \ |
+ namespace { \ |
+ const mus::WindowProperty<TYPE> NAME##_Value = {DEFAULT, #NAME, nullptr}; \ |
+ const mus::WindowProperty<TYPE>* const NAME = &NAME##_Value; \ |
} |
#define DEFINE_OWNED_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \ |