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

Unified Diff: net/disk_cache/blockfile/disk_format_base.h

Issue 826973002: replace COMPILE_ASSERT with static_assert in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply fixups 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 | « net/disk_cache/blockfile/disk_format.h ('k') | net/disk_cache/blockfile/disk_format_v3.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/disk_format_base.h
diff --git a/net/disk_cache/blockfile/disk_format_base.h b/net/disk_cache/blockfile/disk_format_base.h
index 9f4c16e4fd431859546e1713cb9a28fad40f7389..1c49a48e737f7f5ee93cf75dc612f2010db89f1a 100644
--- a/net/disk_cache/blockfile/disk_format_base.h
+++ b/net/disk_cache/blockfile/disk_format_base.h
@@ -61,7 +61,7 @@ struct BlockFileHeader {
AllocBitmap allocation_map;
};
-COMPILE_ASSERT(sizeof(BlockFileHeader) == kBlockHeaderSize, bad_header);
+static_assert(sizeof(BlockFileHeader) == kBlockHeaderSize, "bad header");
// Sparse data support:
// We keep a two level hierarchy to enable sparse data for an entry: the first
@@ -124,8 +124,8 @@ struct SparseData {
// The number of blocks stored by a child entry.
const int kNumSparseBits = 1024;
-COMPILE_ASSERT(sizeof(SparseData) == sizeof(SparseHeader) + kNumSparseBits / 8,
- Invalid_SparseData_bitmap);
+static_assert(sizeof(SparseData) == sizeof(SparseHeader) + kNumSparseBits / 8,
+ "invalid SparseData bitmap");
} // namespace disk_cache
« no previous file with comments | « net/disk_cache/blockfile/disk_format.h ('k') | net/disk_cache/blockfile/disk_format_v3.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698