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

Unified Diff: net/base/network_change_notifier.cc

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/base/mime_sniffer.cc ('k') | net/base/prioritized_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier.cc
diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc
index 05c72a103b8a29a50e71cca9d849ca89896f0f90..34ec592f8fa27c412d3bda8f0f6fd8e504d1c561 100644
--- a/net/base/network_change_notifier.cc
+++ b/net/base/network_change_notifier.cc
@@ -565,10 +565,9 @@ const char* NetworkChangeNotifier::ConnectionTypeToString(
"CONNECTION_NONE",
"CONNECTION_BLUETOOTH"
};
- COMPILE_ASSERT(
- arraysize(kConnectionTypeNames) ==
- NetworkChangeNotifier::CONNECTION_LAST + 1,
- ConnectionType_name_count_mismatch);
+ static_assert(arraysize(kConnectionTypeNames) ==
+ NetworkChangeNotifier::CONNECTION_LAST + 1,
+ "ConnectionType name count should match");
if (type < CONNECTION_UNKNOWN || type > CONNECTION_LAST) {
NOTREACHED();
return "CONNECTION_INVALID";
« no previous file with comments | « net/base/mime_sniffer.cc ('k') | net/base/prioritized_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698