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

Unified Diff: ppapi/thunk/ppb_text_input_thunk.cc

Issue 1676703002: Stop using macros to paste together names for static_asserts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: static-asserts-enums: a,b,#a Created 4 years, 10 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
Index: ppapi/thunk/ppb_text_input_thunk.cc
diff --git a/ppapi/thunk/ppb_text_input_thunk.cc b/ppapi/thunk/ppb_text_input_thunk.cc
index 030a7f57951bca1d0891c147c6ba194077d504ff..c376ce0e9d4d0714aec4332f4a6a537cdb169c87 100644
--- a/ppapi/thunk/ppb_text_input_thunk.cc
+++ b/ppapi/thunk/ppb_text_input_thunk.cc
@@ -16,8 +16,9 @@ namespace thunk {
namespace {
-#define STATIC_ASSERT_ENUM(a, b) \
- static_assert(int(a) == int(b), "mismatching enum values: " #a)
+#define STATIC_ASSERT_ENUM(a, b) \
+ static_assert(static_cast<int>(a) == static_cast<int>(b), \
+ "mismatching enum: " #a)
STATIC_ASSERT_ENUM(PP_TEXTINPUT_TYPE_DEV_NONE, PP_TEXTINPUT_TYPE_NONE);
STATIC_ASSERT_ENUM(PP_TEXTINPUT_TYPE_DEV_TEXT, PP_TEXTINPUT_TYPE_TEXT);
« no previous file with comments | « pdf/pdfium/pdfium_assert_matching_enums.cc ('k') | third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698