提交 879e8a3a 编写于 作者: R Raph Levien

Clear mLineWidths in LineBreaker::finish()

There was the possibility of stale indents from previous invocations
persisting in the mLineWidths across multiple invocations. This patch
clears them.

Bug: 28090810
Change-Id: I3621dfbe983512046289373711709aeade52eab4
上级 9afcc6e2
......@@ -69,6 +69,9 @@ class LineWidths {
}
return width;
}
void clear() {
mIndents.clear();
}
private:
float mFirstWidth;
int mFirstWidthLineCount;
......
......@@ -419,6 +419,7 @@ size_t LineBreaker::computeBreaks() {
void LineBreaker::finish() {
mWordBreaker.finish();
mWidth = 0;
mLineWidths.clear();
mCandidates.clear();
mBreaks.clear();
mWidths.clear();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册