Bug 799062 - eliminate "warning: '&&' within '||'" messages in gfxFont.cpp. r=bas
authorJonathan Kew <jkew@mozilla.com>
Tue, 09 Oct 2012 13:11:20 +0100
changeset 109853 757d21e66392156e973f18e52bb106ed157bfdfd
parent 109852 af631704f1e00119dd2ed92611d0ea23a138e464
child 109854 550038369ab1731d567f7a9f8e78cb036fe8a95f
push id84
push usernmatsakis@mozilla.com
push dateThu, 11 Oct 2012 23:26:24 +0000
reviewersbas
bugs799062
milestone19.0a1
Bug 799062 - eliminate "warning: '&&' within '||'" messages in gfxFont.cpp. r=bas
gfx/thebes/gfxFont.cpp
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -1583,17 +1583,17 @@ struct GlyphBufferAzure {
         return &mGlyphBuffer[mNumGlyphs++];
     }
 
     void Flush(DrawTarget *aDT, gfxTextObjectPaint *aObjectPaint, ScaledFont *aFont,
                gfxFont::DrawMode aDrawMode, bool aReverse, const GlyphRenderingOptions *aOptions,
                gfxContext *aThebesContext, const Matrix *aInvFontMatrix, bool aFinish = false)
     {
         // Ensure there's enough room for a glyph to be added to the buffer
-        if (!aFinish && mNumGlyphs < GLYPH_BUFFER_SIZE || !mNumGlyphs) {
+        if ((!aFinish && mNumGlyphs < GLYPH_BUFFER_SIZE) || !mNumGlyphs) {
             return;
         }
 
         if (aReverse) {
             Glyph *begin = &mGlyphBuffer[0];
             Glyph *end = &mGlyphBuffer[mNumGlyphs];
             std::reverse(begin, end);
         }
@@ -4921,17 +4921,17 @@ gfxTextRun::Draw(gfxContext *aContext, g
         gfxFont *font = iter.GetGlyphRun()->mFont;
         uint32_t start = iter.GetStringStart();
         uint32_t end = iter.GetStringEnd();
         uint32_t ligatureRunStart = start;
         uint32_t ligatureRunEnd = end;
         ShrinkToLigatureBoundaries(&ligatureRunStart, &ligatureRunEnd);
         
         bool drawPartial = aDrawMode == gfxFont::GLYPH_FILL ||
-                           aDrawMode == gfxFont::GLYPH_PATH && aCallbacks;
+                           (aDrawMode == gfxFont::GLYPH_PATH && aCallbacks);
 
         if (drawPartial) {
             DrawPartialLigature(font, aContext, start, ligatureRunStart, &pt,
                                 aProvider, aCallbacks);
         }
 
         DrawGlyphs(font, aContext, aDrawMode, &pt, aObjectPaint, ligatureRunStart,
                    ligatureRunEnd, aProvider, ligatureRunStart, ligatureRunEnd);