diff options
author | michi_cc <michi_cc@openttd.org> | 2015-08-10 20:24:13 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2015-08-10 20:24:13 +0000 |
commit | 2b8bb12d623a64897636234ed3c508517a1a2ba6 (patch) | |
tree | 015abed42269cf73bb83b2f92b029084735d82cd /src/smallmap_gui.cpp | |
parent | 35b77450f80580da2aa7f087aa2a1631b92ebd62 (diff) | |
download | openttd-2b8bb12d623a64897636234ed3c508517a1a2ba6.tar.xz |
(svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists.
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r-- | src/smallmap_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 80d4ae2a8..571d8d765 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1076,7 +1076,7 @@ void SmallMapWindow::RebuildColourIndexIfNecessary() _heightmap_schemes[n].height_colours = ReallocT<uint32>(_heightmap_schemes[n].height_colours, heights); for (int z = 0; z < heights; z++) { - uint access_index = (_heightmap_schemes[n].colour_count * z) / heights; + size_t access_index = (_heightmap_schemes[n].colour_count * z) / heights; /* Choose colour by mapping the range (0..max heightlevel) on the complete colour table. */ _heightmap_schemes[n].height_colours[z] = _heightmap_schemes[n].height_colours_base[access_index]; @@ -1401,7 +1401,7 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) case WID_SM_ZOOM_IN: case WID_SM_ZOOM_OUT: { const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SM_MAP); - Point pt = {wid->current_x / 2, wid->current_y / 2}; + Point pt = { (int)wid->current_x / 2, (int)wid->current_y / 2}; this->SetZoomLevel((widget == WID_SM_ZOOM_IN) ? ZLC_ZOOM_IN : ZLC_ZOOM_OUT, &pt); if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); break; |