From 7a305a2ef715778fc97d1ab3d8d765f550db438d Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Mon, 5 Nov 2018 16:48:46 -0500 Subject: [PATCH] Enums: specify base Change-Id: I540435869bfd22b47eaa4f2f1471654c53707ea1 Reviewed-on: https://skia-review.googlesource.com/c/168279 Commit-Queue: Cary Clark Auto-Submit: Hal Canary Reviewed-by: Cary Clark --- include/core/SkFont.h | 2 +- include/core/SkFontTypes.h | 4 ++-- include/core/SkPaint.h | 8 ++++---- include/core/SkTypeface.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/core/SkFont.h b/include/core/SkFont.h index 3777ad7e63..2311491e75 100644 --- a/include/core/SkFont.h +++ b/include/core/SkFont.h @@ -37,7 +37,7 @@ public: kDEPRECATED_LCDRender_Flag = 1 << 6, }; - enum Hinting { + enum Hinting : uint8_t { kNo_Hinting = 0, //!< glyph outlines unchanged kSlight_Hinting = 1, //!< minimal modification to improve constrast kNormal_Hinting = 2, //!< glyph outlines modified to improve constrast diff --git a/include/core/SkFontTypes.h b/include/core/SkFontTypes.h index 80e31bcce6..cf8dca15c4 100644 --- a/include/core/SkFontTypes.h +++ b/include/core/SkFontTypes.h @@ -11,14 +11,14 @@ #include "SkScalar.h" #include "SkTypeface.h" -enum SkTextEncoding { +enum SkTextEncoding : uint8_t { kUTF8_SkTextEncoding, kUTF16_SkTextEncoding, kUTF32_SkTextEncoding, kGlyphID_SkTextEncoding, }; -enum SkFontHinting { +enum SkFontHinting : uint8_t { kNo_SkFontHinting = 0, //!< glyph outlines unchanged kSlight_SkFontHinting = 1, //!< minimal modification to improve constrast kNormal_SkFontHinting = 2, //!< glyph outlines modified to improve constrast diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index 147f9675fd..16125ba978 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -190,7 +190,7 @@ public: The four levels roughly control corresponding features on platforms that use FreeType as the font engine. */ - enum Hinting { + enum Hinting : uint8_t { kNo_Hinting = 0, //!< glyph outlines unchanged kSlight_Hinting = 1, //!< minimal modification to improve constrast kNormal_Hinting = 2, //!< glyph outlines modified to improve constrast @@ -453,7 +453,7 @@ public: Use kStrokeAndFill_Style to avoid hitting the same pixels twice with a stroke draw and a fill draw. */ - enum Style { + enum Style : uint8_t { kFill_Style, //!< set to fill geometry kStroke_Style, //!< set to stroke geometry kStrokeAndFill_Style, //!< sets to stroke and fill geometry @@ -591,7 +591,7 @@ public: not contain the actual join. For instance, a fill path constructed with round joins does not necessarily include circles at each connected segment. */ - enum Join { + enum Join : uint8_t { kMiter_Join, //!< extends to miter limit kRound_Join, //!< adds circle kBevel_Join, //!< connects outside edges @@ -909,7 +909,7 @@ public: TextEncoding is set to kUTF8_TextEncoding by default. */ - enum TextEncoding { + enum TextEncoding : uint8_t { kUTF8_TextEncoding, //!< uses bytes to represent UTF-8 or ASCII kUTF16_TextEncoding, //!< uses two byte words to represent most of Unicode kUTF32_TextEncoding, //!< uses four byte words to represent all of Unicode diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h index 46173dadf7..f6e8471273 100644 --- a/include/core/SkTypeface.h +++ b/include/core/SkTypeface.h @@ -176,7 +176,7 @@ public: */ static sk_sp MakeDeserialize(SkStream*); - enum Encoding { + enum Encoding : uint8_t { kUTF8_Encoding, kUTF16_Encoding, kUTF32_Encoding