diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2018-10-14 18:17:09 +0100 |
---|---|---|
committer | frosch <github@elsenhans.name> | 2018-10-31 12:41:49 +0100 |
commit | e0c0394e373d2f3326383e79d7fcb9f4e288ae02 (patch) | |
tree | 0242bbb30aea2abf39ead7af8f0cf7d5fe8f0542 /src/gfx_layout.cpp | |
parent | f5b1115039e41d7f75f91e7355003f10dd01b352 (diff) | |
download | openttd-e0c0394e373d2f3326383e79d7fcb9f4e288ae02.tar.xz |
Fix: Remove various dead or unnecessary assignments
Diffstat (limited to 'src/gfx_layout.cpp')
-rw-r--r-- | src/gfx_layout.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp index 6cef84e13..c493e69c3 100644 --- a/src/gfx_layout.cpp +++ b/src/gfx_layout.cpp @@ -498,11 +498,6 @@ const ParagraphLayouter::Line *FallbackParagraphLayout::NextLine(int max_width) return l; } - const WChar *begin = this->buffer; - const WChar *last_space = NULL; - const WChar *last_char = begin; - int width = 0; - int offset = this->buffer - this->buffer_begin; FontMap::iterator iter = this->runs.Begin(); while (iter->first <= offset) { @@ -513,6 +508,10 @@ const ParagraphLayouter::Line *FallbackParagraphLayout::NextLine(int max_width) const FontCache *fc = iter->second->fc; const WChar *next_run = this->buffer_begin + iter->first; + const WChar *begin = this->buffer; + const WChar *last_space = NULL; + const WChar *last_char; + int width = 0; for (;;) { WChar c = *this->buffer; last_char = this->buffer; |