Bug 739706. Fix gfxFont.cpp compiler warning. r=jfkthame

This commit is contained in:
John Daggett 2012-03-30 10:50:14 -07:00
parent 0fb9dbfc9e
commit 8deeb82347

View File

@ -2262,6 +2262,9 @@ gfxFont::ShapeWord(gfxContext *aContext,
return ok;
}
inline static bool IsChar8Bit(PRUint8 /*aCh*/) { return true; }
inline static bool IsChar8Bit(PRUnichar aCh) { return aCh < 0x100; }
template<typename T>
bool
gfxFont::SplitAndInitTextRun(gfxContext *aContext,
@ -2332,7 +2335,7 @@ gfxFont::SplitAndInitTextRun(gfxContext *aContext,
}
if (!breakHere) {
if (ch >= 0x100) {
if (!IsChar8Bit(ch)) {
wordIs8Bit = false;
}
// include this character in the hash, and move on to next
@ -2410,7 +2413,7 @@ gfxFont::SplitAndInitTextRun(gfxContext *aContext,
// word was forcibly broken, so current char will begin next word
hash = HashMix(0, ch);
wordStart = i;
wordIs8Bit = (ch < 0x100);
wordIs8Bit = IsChar8Bit(ch);
}
return true;