summaryrefslogtreecommitdiff
path: root/src/gfx_layout.cpp
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-08-10 12:47:24 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-08-10 12:47:24 +0000
commit0baa72aff9737e17741b83c8a6d87891fb03bc0f (patch)
treecfb2f5ab859ce5cf7ebea2ef2724fe721466e213 /src/gfx_layout.cpp
parentfd16b0c65c1b65908f20527c010a83b6e7e4cf3b (diff)
downloadopenttd-0baa72aff9737e17741b83c8a6d87891fb03bc0f.tar.xz
(svn r25714) -Fix: explicitly cast some things to silence warnings on GCC 4.0
Diffstat (limited to 'src/gfx_layout.cpp')
-rw-r--r--src/gfx_layout.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp
index 618474e06..eca2d4ba4 100644
--- a/src/gfx_layout.cpp
+++ b/src/gfx_layout.cpp
@@ -262,7 +262,7 @@ int ParagraphLayout::Line::getWidth() const
* the last run gives us the end of the line and thus the width.
*/
const VisualRun *run = this->getVisualRun(this->countRuns() - 1);
- return run->getPositions()[run->getGlyphCount() * 2];
+ return (int)run->getPositions()[run->getGlyphCount() * 2];
}
/**
@@ -593,8 +593,8 @@ const char *Layouter::GetCharAtPosition(int x) const
/* Not a valid glyph (empty). */
if (run->getGlyphs()[i] == 0xFFFF) continue;
- int begin_x = run->getPositions()[i * 2];
- int end_x = run->getPositions()[i * 2 + 2];
+ int begin_x = (int)run->getPositions()[i * 2];
+ int end_x = (int)run->getPositions()[i * 2 + 2];
if (IsInsideMM(x, begin_x, end_x)) {
/* Found our glyph, now convert to UTF-8 string index. */