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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 817023003: replace COMPILE_ASSERT with static_assert in gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 7ea1a06e73bdf90cbccf38f381c3188bc6d7f7ac..f55ff3b61f26d21f85bf431391a04d1525d4e7f2 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -198,12 +198,12 @@ class GLES2DecoderImpl;
// a few others) are 32bits. If they are not 32bits the code will have to change
// to call those GL functions with service side memory and then copy the results
// to shared memory, converting the sizes.
-COMPILE_ASSERT(sizeof(GLint) == sizeof(uint32), // NOLINT
- GLint_not_same_size_as_uint32);
-COMPILE_ASSERT(sizeof(GLsizei) == sizeof(uint32), // NOLINT
- GLint_not_same_size_as_uint32);
-COMPILE_ASSERT(sizeof(GLfloat) == sizeof(float), // NOLINT
- GLfloat_not_same_size_as_float);
+static_assert(sizeof(GLint) == sizeof(uint32), // NOLINT
+ "GLint should be the same size as uint32");
+static_assert(sizeof(GLsizei) == sizeof(uint32), // NOLINT
+ "GLsizei should be the same size as uint32");
+static_assert(sizeof(GLfloat) == sizeof(float), // NOLINT
+ "GLfloat should be the same size as float");
// TODO(kbr): the use of this anonymous namespace core dumps the
// linker on Mac OS X 10.6 when the symbol ordering file is used

Powered by Google App Engine
This is Rietveld 408576698