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

Unified Diff: chrome/installer/util/delete_tree_work_item.cc

Issue 1468803002: Switch to static_assert. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@assert1
Patch Set: message cleanup Created 5 years, 1 month 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 | « chrome/installer/util/channel_info.cc ('k') | chrome/installer/util/google_update_settings_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/delete_tree_work_item.cc
diff --git a/chrome/installer/util/delete_tree_work_item.cc b/chrome/installer/util/delete_tree_work_item.cc
index dcb8d1ebc001556c9ddc1afce01dab125c6d544f..404f0857561cde4be4024555d80d72125a5f8aa1 100644
--- a/chrome/installer/util/delete_tree_work_item.cc
+++ b/chrome/installer/util/delete_tree_work_item.cc
@@ -17,8 +17,8 @@ namespace {
template<typename L, typename R>
bool SafeCast(L left, R* right) {
DCHECK(right);
- COMPILE_ASSERT(sizeof(left) == sizeof(right),
- must_add_support_for_crazy_data_types);
+ static_assert(sizeof(left) == sizeof(right),
+ "Items SafeCast is used with must be of the same size");
if (left > static_cast<L>(std::numeric_limits<R>::max()))
return false;
*right = static_cast<L>(left);
« no previous file with comments | « chrome/installer/util/channel_info.cc ('k') | chrome/installer/util/google_update_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698