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

Unified Diff: util/file/file_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 | « minidump/minidump_system_info_writer.cc ('k') | util/file/string_file_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/file/file_writer.cc
diff --git a/util/file/file_writer.cc b/util/file/file_writer.cc
index 703a88291a5140e510c73b54783b99a3334a8995..5c7c25dc46dd1a797115882cc6322e8a4bc6da0a 100644
--- a/util/file/file_writer.cc
+++ b/util/file/file_writer.cc
@@ -25,11 +25,11 @@
namespace crashpad {
// Ensure type compatibility between WritableIoVec and iovec.
-COMPILE_ASSERT(sizeof(WritableIoVec) == sizeof(iovec), WritableIoVec_size);
-COMPILE_ASSERT(offsetof(WritableIoVec, iov_base) == offsetof(iovec, iov_base),
- WritableIoVec_base_offset);
-COMPILE_ASSERT(offsetof(WritableIoVec, iov_len) == offsetof(iovec, iov_len),
- WritableIoVec_len_offset);
+static_assert(sizeof(WritableIoVec) == sizeof(iovec), "WritableIoVec size");
+static_assert(offsetof(WritableIoVec, iov_base) == offsetof(iovec, iov_base),
+ "WritableIoVec base offset");
+static_assert(offsetof(WritableIoVec, iov_len) == offsetof(iovec, iov_len),
+ "WritableIoVec len offset");
FileWriter::FileWriter() : fd_() {
}
« no previous file with comments | « minidump/minidump_system_info_writer.cc ('k') | util/file/string_file_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698