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

Unified Diff: ui/base/resource/data_pack.cc

Issue 828633002: replace COMPILE_ASSERT with static_assert in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix for rebase 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 | « ui/base/layout.cc ('k') | ui/base/x/selection_owner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/data_pack.cc
diff --git a/ui/base/resource/data_pack.cc b/ui/base/resource/data_pack.cc
index 70841b6ba8f32a883f718d5b387800236cab1e39..f9fe9b8469eeb35d3369a4c32cb09ace5ba48b0f 100644
--- a/ui/base/resource/data_pack.cc
+++ b/ui/base/resource/data_pack.cc
@@ -42,7 +42,7 @@ struct DataPackEntry {
};
#pragma pack(pop)
-COMPILE_ASSERT(sizeof(DataPackEntry) == 6, size_of_entry_must_be_six);
+static_assert(sizeof(DataPackEntry) == 6, "size of entry must be six");
// We're crashing when trying to load a pak file on Windows. Add some error
// codes for logging.
@@ -181,8 +181,8 @@ bool DataPack::GetStringPiece(uint16 resource_id,
// bothering to do right now.
#if defined(__BYTE_ORDER)
// Linux check
- COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN,
- datapack_assumes_little_endian);
+ static_assert(__BYTE_ORDER == __LITTLE_ENDIAN,
+ "datapack assumes little endian");
#elif defined(__BIG_ENDIAN__)
// Mac check
#error DataPack assumes little endian
« no previous file with comments | « ui/base/layout.cc ('k') | ui/base/x/selection_owner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698