(svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists.

This commit is contained in:
michi_cc
2015-08-10 20:24:13 +00:00
parent 0cd198c798
commit 44918010df
16 changed files with 32 additions and 32 deletions

View File

@@ -186,7 +186,7 @@ static inline void GfxDoDrawLine(void *video, int x, int y, int x2, int y2, int
int grade_x = x2 - x;
/* Clipping rectangle. Slightly extended so we can ignore the width of the line. */
uint extra = CeilDiv(3 * width, 4); // not less then "width * sqrt(2) / 2"
int extra = (int)CeilDiv(3 * width, 4); // not less then "width * sqrt(2) / 2"
Rect clip = { -extra, -extra, screen_width - 1 + extra, screen_height - 1 + extra };
/* prevent integer overflows. */
@@ -586,7 +586,7 @@ int GetStringLineCount(StringID str, int maxw)
*/
Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion)
{
Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)};
Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)};
return box;
}
@@ -598,7 +598,7 @@ Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestio
*/
Dimension GetStringMultiLineBoundingBox(const char *str, const Dimension &suggestion)
{
Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)};
Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)};
return box;
}