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

Unified Diff: content/browser/indexed_db/indexed_db_leveldb_coding.cc

Issue 791923003: replace COMPILE_ASSERT with static_assert in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/browser/indexed_db/indexed_db_leveldb_coding.cc
diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.cc b/content/browser/indexed_db/indexed_db_leveldb_coding.cc
index f8a3a1e51bdb486ebfcd3b221ee7db23f4d32007..47ed07b3017ff5fc02b998c6e5902e68541b588f 100644
--- a/content/browser/indexed_db/indexed_db_leveldb_coding.cc
+++ b/content/browser/indexed_db/indexed_db_leveldb_coding.cc
@@ -1256,10 +1256,10 @@ std::string KeyPrefix::EncodeInternal(int64 database_id,
kMaxIndexIdSizeBits) |
(object_store_id_string.size() - 1) << kMaxIndexIdSizeBits |
(index_id_string.size() - 1);
- COMPILE_ASSERT(kMaxDatabaseIdSizeBits + kMaxObjectStoreIdSizeBits +
- kMaxIndexIdSizeBits ==
- sizeof(first_byte) * 8,
- CANT_ENCODE_IDS);
+ static_assert(kMaxDatabaseIdSizeBits + kMaxObjectStoreIdSizeBits +
+ kMaxIndexIdSizeBits ==
+ sizeof(first_byte) * 8,
+ "cannot encode ids");
std::string ret;
ret.reserve(kDefaultInlineBufferSize);
ret.push_back(first_byte);
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/indexed_db/leveldb/leveldb_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698