Skip to content

Commit 40022ad

Browse files
Mike KleinSkia Commit-Bot
authored andcommitted
use SkFourByteTag to squelch warnings
[173/2069] compile ../src/ports/SkTypeface_mac_ct.cpp ../src/ports/SkTypeface_mac_ct.cpp:649:29: warning: multi-character character constant [-Wfour-char-constants] if (!this->getTableSize('glyf') || !this->getTableSize('loca')) { ^ ../src/ports/SkTypeface_mac_ct.cpp:649:60: warning: multi-character character constant [-Wfour-char-constants] if (!this->getTableSize('glyf') || !this->getTableSize('loca')) { ^ Change-Id: I9dc691be285fe0e144aaabe4b81e6bc775564423 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333483 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Auto-Submit: Mike Klein <mtklein@google.com>
1 parent 7f7b485 commit 40022ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ports/SkTypeface_mac_ct.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,9 @@ std::unique_ptr<SkAdvancedTypefaceMetrics> SkTypeface_Mac::onGetAdvancedMetrics(
646646
// fonts always have both glyf and loca tables. At the least, this is what
647647
// sfntly needs to subset the font. CTFontCopyAttribute() does not always
648648
// succeed in determining this directly.
649-
if (!this->getTableSize('glyf') || !this->getTableSize('loca')) {
649+
if (!this->getTableSize(SkSetFourByteTag('g','l','y','f')) ||
650+
!this->getTableSize(SkSetFourByteTag('l','o','c','a')))
651+
{
650652
return info;
651653
}
652654

0 commit comments

Comments
 (0)