Index: mojo/converters/ime/ime_type_converters.cc |
diff --git a/mojo/converters/ime/ime_type_converters.cc b/mojo/converters/ime/ime_type_converters.cc |
index 9a59f2fff5f0ff5c45e499e93685e38162b299b7..7b40ef69fbde814a8a447590a4b537524173da1d 100644 |
--- a/mojo/converters/ime/ime_type_converters.cc |
+++ b/mojo/converters/ime/ime_type_converters.cc |
@@ -9,10 +9,10 @@ |
namespace mojo { |
-#define TEXT_INPUT_TYPE_ASSERT(NAME) \ |
- COMPILE_ASSERT(static_cast<int32>(TEXT_INPUT_TYPE_##NAME) == \ |
- static_cast<int32>(ui::TEXT_INPUT_TYPE_##NAME), \ |
- text_input_type_should_match) |
+#define TEXT_INPUT_TYPE_ASSERT(NAME) \ |
+ static_assert(static_cast<int32>(TEXT_INPUT_TYPE_##NAME) == \ |
+ static_cast<int32>(ui::TEXT_INPUT_TYPE_##NAME), \ |
+ "TEXT_INPUT_TYPE must match") |
TEXT_INPUT_TYPE_ASSERT(NONE); |
TEXT_INPUT_TYPE_ASSERT(TEXT); |
TEXT_INPUT_TYPE_ASSERT(PASSWORD); |
@@ -29,10 +29,10 @@ TEXT_INPUT_TYPE_ASSERT(TIME); |
TEXT_INPUT_TYPE_ASSERT(WEEK); |
TEXT_INPUT_TYPE_ASSERT(TEXT_AREA); |
-#define TEXT_INPUT_FLAG_ASSERT(NAME) \ |
- COMPILE_ASSERT(static_cast<int32>(TEXT_INPUT_FLAG_##NAME) == \ |
- static_cast<int32>(ui::TEXT_INPUT_FLAG_##NAME), \ |
- text_input_flag_should_match) |
+#define TEXT_INPUT_FLAG_ASSERT(NAME) \ |
+ static_assert(static_cast<int32>(TEXT_INPUT_FLAG_##NAME) == \ |
+ static_cast<int32>(ui::TEXT_INPUT_FLAG_##NAME), \ |
+ "TEXT_INPUT_FLAG must match") |
TEXT_INPUT_FLAG_ASSERT(NONE); |
TEXT_INPUT_FLAG_ASSERT(AUTOCOMPLETE_ON); |
TEXT_INPUT_FLAG_ASSERT(AUTOCOMPLETE_OFF); |