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

Unified Diff: gpu/config/gpu_info.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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_info.cc
diff --git a/gpu/config/gpu_info.cc b/gpu/config/gpu_info.cc
index f1f67cee9178fce094c4532877a53ea22888e90b..6ceb7fcf5155bc982cea2adec22d83897ec4b59d 100644
--- a/gpu/config/gpu_info.cc
+++ b/gpu/config/gpu_info.cc
@@ -108,9 +108,9 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
// If this assert fails then most likely something below needs to be updated.
// Note that this assert is only approximate. If a new field is added to
// GPUInfo which fits within the current padding then it will not be caught.
- COMPILE_ASSERT(
+ static_assert(
sizeof(GPUInfo) == sizeof(GPUInfoKnownFields),
- Fields_Have_Changed_In_GPUInfo_So_Update_Below);
+ "fields have changed in GPUInfo, GPUInfoKnownFields must be updated");
// Required fields (according to DevTools protocol) first.
enumerator->AddString("machineModelName", machine_model_name);
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698