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

Unified Diff: Source/platform/fonts/skia/FontCacheSkia.cpp

Issue 813883002: replace COMPILE_ASSERT with static_assert in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: final fixups Created 6 years 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 | « Source/platform/fonts/shaping/HarfBuzzShaper.cpp ('k') | Source/platform/geometry/Region.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/skia/FontCacheSkia.cpp
diff --git a/Source/platform/fonts/skia/FontCacheSkia.cpp b/Source/platform/fonts/skia/FontCacheSkia.cpp
index 72e5d660fcd29741efc38739cba6db1eb4eb11ec..75ab9d445222c7c65e689ba62f04c38141417a34 100644
--- a/Source/platform/fonts/skia/FontCacheSkia.cpp
+++ b/Source/platform/fonts/skia/FontCacheSkia.cpp
@@ -174,12 +174,12 @@ static inline SkFontStyle fontStyle(const FontDescription& fontDescription)
return SkFontStyle(weight, width, slant);
}
-COMPILE_ASSERT(static_cast<int>(FontStretchUltraCondensed) == static_cast<int>(SkFontStyle::kUltraCondensed_Width),
- FontStretchUltraCondensedMapsTokUltraCondensed_Width);
-COMPILE_ASSERT(static_cast<int>(FontStretchNormal) == static_cast<int>(SkFontStyle::kNormal_Width),
- FontStretchNormalMapsTokNormal_Width);
-COMPILE_ASSERT(static_cast<int>(FontStretchUltraExpanded) == static_cast<int>(SkFontStyle::kUltaExpanded_Width),
- FontStretchUltraExpandedMapsTokUltaExpanded_Width);
+static_assert(static_cast<int>(FontStretchUltraCondensed) == static_cast<int>(SkFontStyle::kUltraCondensed_Width),
+ "FontStretchUltraCondensed should map to kUltraCondensed_Width");
+static_assert(static_cast<int>(FontStretchNormal) == static_cast<int>(SkFontStyle::kNormal_Width),
+ "FontStretchNormal should map to kNormal_Width");
+static_assert(static_cast<int>(FontStretchUltraExpanded) == static_cast<int>(SkFontStyle::kUltaExpanded_Width),
+ "FontStretchUltraExpanded should map to kUltaExpanded_Width");
#endif
PassRefPtr<SkTypeface> FontCache::createTypeface(const FontDescription& fontDescription, const FontFaceCreationParams& creationParams, CString& name)
« no previous file with comments | « Source/platform/fonts/shaping/HarfBuzzShaper.cpp ('k') | Source/platform/geometry/Region.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698