From 2c13c60e916768fe09bcfff1d0b568a4c5397a99 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 30 Apr 2014 19:52:52 +0300 Subject: Fix code style in render. --- src/render/mobileopenglgraphics.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'src/render/mobileopenglgraphics.cpp') diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp index ede89f115..3db76a616 100644 --- a/src/render/mobileopenglgraphics.cpp +++ b/src/render/mobileopenglgraphics.cpp @@ -53,18 +53,18 @@ tVar[vp + 9] = y2; \ tVar[vp + 10] = x2; \ tVar[vp + 11] = y2; \ - vVar[vp + 0] = dstX; \ - vVar[vp + 1] = dstY; \ - vVar[vp + 2] = dstX + w; \ - vVar[vp + 3] = dstY; \ - vVar[vp + 4] = dstX + w; \ - vVar[vp + 5] = dstY + h; \ - vVar[vp + 6] = dstX; \ - vVar[vp + 7] = dstY; \ - vVar[vp + 8] = dstX; \ - vVar[vp + 9] = dstY + h; \ - vVar[vp + 10] = dstX + w; \ - vVar[vp + 11] = dstY + h; + vVar[vp + 0] = static_cast(dstX); \ + vVar[vp + 1] = static_cast(dstY); \ + vVar[vp + 2] = static_cast(dstX + w); \ + vVar[vp + 3] = static_cast(dstY); \ + vVar[vp + 4] = static_cast(dstX + w); \ + vVar[vp + 5] = static_cast(dstY + h); \ + vVar[vp + 6] = static_cast(dstX); \ + vVar[vp + 7] = static_cast(dstY); \ + vVar[vp + 8] = static_cast(dstX); \ + vVar[vp + 9] = static_cast(dstY + h); \ + vVar[vp + 10] = static_cast(dstX + w); \ + vVar[vp + 11] = static_cast(dstY + h); GLuint MobileOpenGLGraphics::mLastImage = 0; #ifdef DEBUG_DRAW_CALLS @@ -1163,8 +1163,10 @@ bool MobileOpenGLGraphics::drawNet(const int x1, const int y1, const GLshort xs2 = static_cast(x2); const GLshort ys1 = static_cast(y1); const GLshort ys2 = static_cast(y2); + const int16_t width1 = static_cast(width); + const int16_t height1 = static_cast(height); - for (int16_t y = y1; y < y2; y += height) + for (int16_t y = static_cast(y1); y < y2; y += height1) { mShortVertArray[vp + 0] = xs1; mShortVertArray[vp + 1] = y; @@ -1180,7 +1182,7 @@ bool MobileOpenGLGraphics::drawNet(const int x1, const int y1, } } - for (int16_t x = x1; x < x2; x += width) + for (int16_t x = static_cast(x1); x < x2; x += width1) { mShortVertArray[vp + 0] = x; mShortVertArray[vp + 1] = ys1; -- cgit v1.2.3-70-g09d2