From 169de499b578d63cff0fd3d6aacc55548ddfd052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 5 Sep 2013 15:52:55 +0200 Subject: [PATCH] HaikuDepot: Removed no longer needed info from GlyphInfo. --- .../haiku-depot/textview/ParagraphLayout.cpp | 5 +--- .../haiku-depot/textview/ParagraphLayout.h | 24 ++++--------------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/apps/haiku-depot/textview/ParagraphLayout.cpp b/src/apps/haiku-depot/textview/ParagraphLayout.cpp index 0a1005a109..0b234b6f0f 100644 --- a/src/apps/haiku-depot/textview/ParagraphLayout.cpp +++ b/src/apps/haiku-depot/textview/ParagraphLayout.cpp @@ -320,8 +320,6 @@ ParagraphLayout::_Layout() // advanceX = tabOffset - x; // } - glyph.advanceX = advanceX; - if (glyph.charCode == '\n') { nextLine = true; lineBreak = true; @@ -461,8 +459,7 @@ ParagraphLayout::_AppendGlyphInfo(uint32 charCode, float width, width += style.GlyphSpacing(); - GlyphInfo glyph(charCode, 0.0f, width, width, 0, style); - return fGlyphInfos.Add(glyph); + return fGlyphInfos.Add(GlyphInfo(charCode, 0.0f, width, 0)); } diff --git a/src/apps/haiku-depot/textview/ParagraphLayout.h b/src/apps/haiku-depot/textview/ParagraphLayout.h index ff228d2765..d0c3425047 100644 --- a/src/apps/haiku-depot/textview/ParagraphLayout.h +++ b/src/apps/haiku-depot/textview/ParagraphLayout.h @@ -23,21 +23,16 @@ public: charCode(0), x(0.0f), width(0.0f), - advanceX(0.0f), - lineIndex(0), - style() + lineIndex(0) { } - GlyphInfo(uint32 charCode, float x, float width, float advanceX, - int32 lineIndex, const CharacterStyle& style) + GlyphInfo(uint32 charCode, float x, float width, int32 lineIndex) : charCode(charCode), x(x), width(width), - advanceX(advanceX), - lineIndex(lineIndex), - style(style) + lineIndex(lineIndex) { } @@ -46,9 +41,7 @@ public: charCode(other.charCode), x(other.x), width(other.width), - advanceX(other.advanceX), - lineIndex(other.lineIndex), - style(other.style) + lineIndex(other.lineIndex) { } @@ -57,9 +50,7 @@ public: charCode = other.charCode; x = other.x; width = other.width; - advanceX = other.advanceX; lineIndex = other.lineIndex; - style = other.style; return *this; } @@ -68,9 +59,7 @@ public: return charCode == other.charCode && x == other.x && width == other.width - && advanceX == other.advanceX - && lineIndex == other.lineIndex - && style == other.style; + && lineIndex == other.lineIndex; } bool operator!=(const GlyphInfo& other) const @@ -83,11 +72,8 @@ public: float x; float width; - float advanceX; int32 lineIndex; - - CharacterStyle style; };