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

Side by Side Diff: public/platform/WebGamepad.h

Issue 802633005: replace COMPILE_ASSERT with static_assert in public/platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: improve static_assert msgs Created 6 years 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 unified diff | Download patch
« no previous file with comments | « public/platform/WebDeviceOrientationData.h ('k') | public/platform/WebGamepads.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (C) 2011, Google Inc. All rights reserved. 1 // Copyright (C) 2011, Google Inc. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are met: 4 // modification, are permitted provided that the following conditions are met:
5 // 5 //
6 // 1. Redistributions of source code must retain the above copyright 6 // 1. Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // 2. Redistributions in binary form must reproduce the above copyright 8 // 2. Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the 9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution. 10 // documentation and/or other materials provided with the distribution.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 unsigned buttonsLength; 90 unsigned buttonsLength;
91 91
92 // Button states 92 // Button states
93 WebGamepadButton buttons[buttonsLengthCap]; 93 WebGamepadButton buttons[buttonsLengthCap];
94 94
95 // Mapping type (for example "standard") 95 // Mapping type (for example "standard")
96 WebUChar mapping[mappingLengthCap]; 96 WebUChar mapping[mappingLengthCap];
97 }; 97 };
98 98
99 #if BLINK_IMPLEMENTATION 99 #if BLINK_IMPLEMENTATION
100 COMPILE_ASSERT(sizeof(WebGamepad) == 721, WebGamepad_has_wrong_size); 100 static_assert(sizeof(WebGamepad) == 721, "WebGamepad has wrong size");
101 #endif 101 #endif
102 102
103 #pragma pack(pop) 103 #pragma pack(pop)
104 104
105 } 105 }
106 106
107 #endif // WebGamepad_h 107 #endif // WebGamepad_h
OLDNEW
« no previous file with comments | « public/platform/WebDeviceOrientationData.h ('k') | public/platform/WebGamepads.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698