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

Unified Diff: content/renderer/pepper/pepper_websocket_host.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
Index: content/renderer/pepper/pepper_websocket_host.cc
diff --git a/content/renderer/pepper/pepper_websocket_host.cc b/content/renderer/pepper/pepper_websocket_host.cc
index 5a29a70a9e2086218eb9e87d6b591e69a80efd09..2250a691406e18eb8ebafb33ff22910bcb6d4452 100644
--- a/content/renderer/pepper/pepper_websocket_host.cc
+++ b/content/renderer/pepper/pepper_websocket_host.cc
@@ -31,9 +31,9 @@ using blink::WebURL;
namespace content {
#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, np_name) \
- COMPILE_ASSERT( \
+ static_assert( \
static_cast<int>(WebSocket::webkit_name) == static_cast<int>(np_name), \
- mismatching_enums)
+ "WebSocket enums must match PPAPI's")
COMPILE_ASSERT_MATCHING_ENUM(CloseEventCodeNormalClosure,
PP_WEBSOCKETSTATUSCODE_NORMAL_CLOSURE);
« no previous file with comments | « content/renderer/media/webrtc/stun_field_trial.cc ('k') | extensions/browser/api/web_request/web_request_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698