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

Unified Diff: content/browser/background_sync/background_sync_service_impl.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
Index: content/browser/background_sync/background_sync_service_impl.cc
diff --git a/content/browser/background_sync/background_sync_service_impl.cc b/content/browser/background_sync/background_sync_service_impl.cc
index ead436f4a077512c517c86c755a8f8128063274b..04f9e7f6d26e0cb928e9b6aa743e028169de06ab 100644
--- a/content/browser/background_sync/background_sync_service_impl.cc
+++ b/content/browser/background_sync/background_sync_service_impl.cc
@@ -47,9 +47,9 @@ SyncRegistrationPtr ToMojoRegistration(
} // namespace
#define COMPILE_ASSERT_MATCHING_ENUM(mojo_name, manager_name) \
- COMPILE_ASSERT(static_cast<int>(content::mojo_name) == \
- static_cast<int>(content::manager_name), \
- mismatching_enums)
+ static_assert(static_cast<int>(content::mojo_name) == \
+ static_cast<int>(content::manager_name), \
+ "mojo and manager enums must match")
// TODO(iclelland): Move these tests somewhere else
COMPILE_ASSERT_MATCHING_ENUM(BACKGROUND_SYNC_ERROR_NONE,

Powered by Google App Engine
This is Rietveld 408576698