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

Unified Diff: courgette/third_party/bsdiff_create.cc

Issue 857153003: Use "static_assert" in lieu of "COMPILE_ASSERT" in courgete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « courgette/third_party/bsdiff_apply.cc ('k') | courgette/types_win_pe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/third_party/bsdiff_create.cc
diff --git a/courgette/third_party/bsdiff_create.cc b/courgette/third_party/bsdiff_create.cc
index 6086247dac4ffa290c0b84f711c08f066b651777..b43b53a4cd4290e46ee0e9441ada04d83f3cd9ec 100644
--- a/courgette/third_party/bsdiff_create.cc
+++ b/courgette/third_party/bsdiff_create.cc
@@ -424,8 +424,8 @@ BSDiffStatus CreateBinaryPatch(SourceStream* old_stream,
MBSPatchHeader header;
// The string will have a null terminator that we don't use, hence '-1'.
- COMPILE_ASSERT(sizeof(MBS_PATCH_HEADER_TAG) - 1 == sizeof(header.tag),
- MBS_PATCH_HEADER_TAG_must_match_header_field_size);
+ static_assert(sizeof(MBS_PATCH_HEADER_TAG) - 1 == sizeof(header.tag),
+ "MBS_PATCH_HEADER_TAG must match header field size");
memcpy(header.tag, MBS_PATCH_HEADER_TAG, sizeof(header.tag));
header.slen = oldsize;
header.scrc32 = CalculateCrc(old, oldsize);
« no previous file with comments | « courgette/third_party/bsdiff_apply.cc ('k') | courgette/types_win_pe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698