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

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: 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
Index: util/file/file_writer.cc
diff --git a/util/file/file_writer.cc b/util/file/file_writer.cc
index 703a88291a5140e510c73b54783b99a3334a8995..487427ae7c07ba30be8fdc514bfc1cfd0f1fb0c2 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"),
Mark Mentovai 2014/10/01 03:55:12 You changed the wrong parameter. ../../util/file/
scottmg 2014/10/01 16:37:18 Done.
+ WritableIoVec_base_offset);
+static_assert(offsetof(WritableIoVec, iov_len) == offsetof(iovec, "iov len"),
+ WritableIoVec_len_offset);
FileWriter::FileWriter() : fd_() {
}

Powered by Google App Engine
This is Rietveld 408576698