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

Unified Diff: components/font_service/font_service_app.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/util_constants.h ('k') | components/html_viewer/blink_basic_type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/font_service/font_service_app.cc
diff --git a/components/font_service/font_service_app.cc b/components/font_service/font_service_app.cc
index 41a7f9e5a479b0e90ff3e500a03c9a2b53c69623..350bc5f07324bcaede39f55c4f4a3046ab0cbfae 100644
--- a/components/font_service/font_service_app.cc
+++ b/components/font_service/font_service_app.cc
@@ -9,19 +9,18 @@
#include "mojo/application/public/cpp/application_connection.h"
#include "mojo/platform_handle/platform_handle_functions.h"
-COMPILE_ASSERT(static_cast<uint32>(SkTypeface::kNormal) ==
- static_cast<uint32>(font_service::TYPEFACE_STYLE_NORMAL),
- typeface_flags_should_match);
-COMPILE_ASSERT(static_cast<uint32>(SkTypeface::kBold) ==
- static_cast<uint32>(font_service::TYPEFACE_STYLE_BOLD),
- typeface_flags_should_match);
-COMPILE_ASSERT(static_cast<uint32>(SkTypeface::kItalic) ==
- static_cast<uint32>(font_service::TYPEFACE_STYLE_ITALIC),
- typeface_flags_should_match);
-COMPILE_ASSERT(
- static_cast<uint32>(SkTypeface::kBoldItalic) ==
- static_cast<uint32>(font_service::TYPEFACE_STYLE_BOLD_ITALIC),
- typeface_flags_should_match);
+static_assert(static_cast<uint32>(SkTypeface::kNormal) ==
+ static_cast<uint32>(font_service::TYPEFACE_STYLE_NORMAL),
+ "Skia and font service flags must match");
+static_assert(static_cast<uint32>(SkTypeface::kBold) ==
+ static_cast<uint32>(font_service::TYPEFACE_STYLE_BOLD),
+ "Skia and font service flags must match");
+static_assert(static_cast<uint32>(SkTypeface::kItalic) ==
+ static_cast<uint32>(font_service::TYPEFACE_STYLE_ITALIC),
+ "Skia and font service flags must match");
+static_assert(static_cast<uint32>(SkTypeface::kBoldItalic) ==
+ static_cast<uint32>(font_service::TYPEFACE_STYLE_BOLD_ITALIC),
+ "Skia and font service flags must match");
namespace {
« no previous file with comments | « chrome/installer/util/util_constants.h ('k') | components/html_viewer/blink_basic_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698