From fc893070c9255637950ac9844c1ad519b0115bd8 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 27 Apr 2013 12:47:02 +0200 Subject: [harfbuzz] Don't change the returned positions Use local variables instead of altering the returned glyph positions array, looks more cleaner this way. Change-Id: Ibbcced57777010bd045668a99d7beb0618abe226 --- vcl/generic/glyphs/gcach_layout.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index 5cd1b07c14b8..abd9adffd947 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -426,20 +426,20 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) if (hb_ot_layout_get_glyph_class(maHbFace, nGlyphIndex) == HB_OT_LAYOUT_GLYPH_CLASS_MARK) nGlyphFlags |= GlyphItem::IS_DIACRITIC; - aHbPositions[i].x_offset = aHbPositions[i].x_offset >> 6; - aHbPositions[i].y_offset = aHbPositions[i].y_offset >> 6; - aHbPositions[i].x_advance = aHbPositions[i].x_advance >> 6; - aHbPositions[i].y_advance = aHbPositions[i].y_advance >> 6; + int32_t nXOffset = aHbPositions[i].x_offset >> 6; + int32_t nYOffset = aHbPositions[i].y_offset >> 6; + int32_t nXAdvance = aHbPositions[i].x_advance >> 6; + int32_t nYAdvance = aHbPositions[i].y_advance >> 6; - Point aNewPos = Point(aCurrPos.X() + aHbPositions[i].x_offset, -(aCurrPos.Y() + aHbPositions[i].y_offset)); + Point aNewPos = Point(aCurrPos.X() + nXOffset, -(aCurrPos.Y() + nYOffset)); GlyphItem aGI(nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth); - aGI.mnNewWidth = aHbPositions[i].x_advance; + aGI.mnNewWidth = nXAdvance; rLayout.AppendGlyph(aGI); - aCurrPos.X() += aHbPositions[i].x_advance; - aCurrPos.Y() += aHbPositions[i].y_advance; + aCurrPos.X() += nXAdvance; + aCurrPos.Y() += nYAdvance; } hb_buffer_destroy(aHbBuffer); -- cgit