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

Unified Diff: mojo/converters/ime/ime_type_converters.cc

Issue 1468803002: Switch to static_assert. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@assert1
Patch Set: message cleanup 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 | « media/base/yuv_convert.cc ('k') | mojo/converters/input_events/input_events_type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « media/base/yuv_convert.cc ('k') | mojo/converters/input_events/input_events_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698