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

Unified Diff: minidump/minidump_system_info_writer.cc

Issue 615923004: Convert COMPILE_ASSERT to static_assert (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 6 years, 3 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 | « crashpad.doxy ('k') | util/file/file_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_system_info_writer.cc
diff --git a/minidump/minidump_system_info_writer.cc b/minidump/minidump_system_info_writer.cc
index f59e3d378e333e5c0d4c5a0a9d05e24309513f4b..a8cabb7bc27c585e5d2eb076ce88bd422426278d 100644
--- a/minidump/minidump_system_info_writer.cc
+++ b/minidump/minidump_system_info_writer.cc
@@ -47,8 +47,8 @@ void MinidumpSystemInfoWriter::SetCPUX86Vendor(uint32_t ebx,
system_info_.ProcessorArchitecture ==
kMinidumpCPUArchitectureX86Win64);
- COMPILE_ASSERT(arraysize(system_info_.Cpu.X86CpuInfo.VendorId) == 3,
- vendor_id_must_have_3_elements);
+ static_assert(arraysize(system_info_.Cpu.X86CpuInfo.VendorId) == 3,
+ "VendorId must have 3 elements");
system_info_.Cpu.X86CpuInfo.VendorId[0] = ebx;
system_info_.Cpu.X86CpuInfo.VendorId[1] = edx;
@@ -61,9 +61,9 @@ void MinidumpSystemInfoWriter::SetCPUX86VendorString(
CHECK_EQ(vendor.size(), sizeof(system_info_.Cpu.X86CpuInfo.VendorId));
uint32_t registers[3];
- COMPILE_ASSERT(
+ static_assert(
sizeof(registers) == sizeof(system_info_.Cpu.X86CpuInfo.VendorId),
- vendor_id_sizes_must_be_equal);
+ "VendorId sizes must be equal");
for (size_t index = 0; index < arraysize(registers); ++index) {
memcpy(&registers[index],
@@ -105,9 +105,8 @@ void MinidumpSystemInfoWriter::SetCPUOtherFeatures(uint64_t features_0,
system_info_.ProcessorArchitecture !=
kMinidumpCPUArchitectureX86Win64);
- COMPILE_ASSERT(
- arraysize(system_info_.Cpu.OtherCpuInfo.ProcessorFeatures) == 2,
- processor_features_must_have_2_elements);
+ static_assert(arraysize(system_info_.Cpu.OtherCpuInfo.ProcessorFeatures) == 2,
+ "ProcessorFeatures must have 2 elements");
system_info_.Cpu.OtherCpuInfo.ProcessorFeatures[0] = features_0;
system_info_.Cpu.OtherCpuInfo.ProcessorFeatures[1] = features_1;
« no previous file with comments | « crashpad.doxy ('k') | util/file/file_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698