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

Unified Diff: mojo/environment/default_logger_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
« no previous file with comments | « mojo/converters/surfaces/surfaces_type_converters.cc ('k') | mojo/services/network/web_socket_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/environment/default_logger_impl.cc
diff --git a/mojo/environment/default_logger_impl.cc b/mojo/environment/default_logger_impl.cc
index 9a321006cfe0ff97a370ad9cfe9f3e942b4f7952..95b13af7d48815ec87c7a6f19a856405c3e0b7e6 100644
--- a/mojo/environment/default_logger_impl.cc
+++ b/mojo/environment/default_logger_impl.cc
@@ -12,16 +12,16 @@ namespace internal {
namespace {
// We rely on log levels being the same numerically:
-COMPILE_ASSERT(logging::LOG_VERBOSE == MOJO_LOG_LEVEL_VERBOSE,
- verbose_log_level_value_mismatch);
-COMPILE_ASSERT(logging::LOG_INFO == MOJO_LOG_LEVEL_INFO,
- info_log_level_value_mismatch);
-COMPILE_ASSERT(logging::LOG_WARNING == MOJO_LOG_LEVEL_WARNING,
- warning_log_level_value_mismatch);
-COMPILE_ASSERT(logging::LOG_ERROR == MOJO_LOG_LEVEL_ERROR,
- error_log_level_value_mismatch);
-COMPILE_ASSERT(logging::LOG_FATAL == MOJO_LOG_LEVEL_FATAL,
- fatal_log_level_value_mismatch);
+static_assert(logging::LOG_VERBOSE == MOJO_LOG_LEVEL_VERBOSE,
+ "verbose log level value mismatch");
+static_assert(logging::LOG_INFO == MOJO_LOG_LEVEL_INFO,
+ "info log level value mismatch");
+static_assert(logging::LOG_WARNING == MOJO_LOG_LEVEL_WARNING,
+ "warning log level value mismatch");
+static_assert(logging::LOG_ERROR == MOJO_LOG_LEVEL_ERROR,
+ "error log level value mismatch");
+static_assert(logging::LOG_FATAL == MOJO_LOG_LEVEL_FATAL,
+ "fatal log level value mismatch");
int MojoToChromiumLogLevel(MojoLogLevel log_level) {
// See the compile asserts above.
« no previous file with comments | « mojo/converters/surfaces/surfaces_type_converters.cc ('k') | mojo/services/network/web_socket_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698