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

Unified Diff: ppapi/shared_impl/ppb_gamepad_shared.cc

Issue 824153003: replace COMPILE_ASSERT with static_assert in ppapi/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 5 years, 11 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
« no previous file with comments | « ppapi/shared_impl/id_assignment.cc ('k') | ppapi/shared_impl/ppb_trace_event_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_gamepad_shared.cc
diff --git a/ppapi/shared_impl/ppb_gamepad_shared.cc b/ppapi/shared_impl/ppb_gamepad_shared.cc
index 2358e87349cd562cd46c28781c9a0dc8b2334cdf..7aa752a8aab561a2d8eba127baed419c77e5ed5d 100644
--- a/ppapi/shared_impl/ppb_gamepad_shared.cc
+++ b/ppapi/shared_impl/ppb_gamepad_shared.cc
@@ -16,8 +16,8 @@ void ConvertWebKitGamepadData(const WebKitGamepads& webkit_data,
const WebKitGamepad& webkit_pad = webkit_data.items[i];
output_pad.connected = webkit_pad.connected ? PP_TRUE : PP_FALSE;
if (webkit_pad.connected) {
- COMPILE_ASSERT(sizeof(output_pad.id) == sizeof(webkit_pad.id),
- id_size_does_not_match);
+ static_assert(sizeof(output_pad.id) == sizeof(webkit_pad.id),
+ "id size does not match");
memcpy(output_pad.id, webkit_pad.id, sizeof(output_pad.id));
output_pad.timestamp = static_cast<double>(webkit_pad.timestamp);
output_pad.axes_length = webkit_pad.axes_length;
« no previous file with comments | « ppapi/shared_impl/id_assignment.cc ('k') | ppapi/shared_impl/ppb_trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698