Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f06a8c2 authored by Andy McFadden's avatar Andy McFadden
Browse files

Reduce C++11 warnings

A few typecasts to fix "narrowing conversion" complaints.

Change-Id: Ib2118079a2ca33959c748d03d8c6f1722d62e8fe
parent 5001001d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ status_t HWComposer::createWorkList(int32_t id, size_t numLayers) {
        if (hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) {
            disp.framebufferTarget = &disp.list->hwLayers[numLayers - 1];
            memset(disp.framebufferTarget, 0, sizeof(hwc_layer_1_t));
            const hwc_rect_t r = { 0, 0, disp.width, disp.height };
            const hwc_rect_t r = { 0, 0, (int) disp.width, (int) disp.height };
            disp.framebufferTarget->compositionType = HWC_FRAMEBUFFER_TARGET;
            disp.framebufferTarget->hints = 0;
            disp.framebufferTarget->flags = 0;
+8 −8
Original line number Diff line number Diff line
@@ -831,10 +831,10 @@ void SurfaceFlinger::doDebugFlashRegions()
                while (it != end) {
                    const Rect& r = *it++;
                    GLfloat vertices[][2] = {
                            { r.left,  height - r.top },
                            { r.left,  height - r.bottom },
                            { r.right, height - r.bottom },
                            { r.right, height - r.top }
                            { (GLfloat) r.left,  (GLfloat) (height - r.top) },
                            { (GLfloat) r.left,  (GLfloat) (height - r.bottom) },
                            { (GLfloat) r.right, (GLfloat) (height - r.bottom) },
                            { (GLfloat) r.right, (GLfloat) (height - r.top) }
                    };
                    glVertexPointer(2, GL_FLOAT, 0, vertices);
                    glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
@@ -1646,10 +1646,10 @@ void SurfaceFlinger::drawWormhole(const sp<const DisplayDevice>& hw,
    while (it != end) {
        const Rect& r = *it++;
        GLfloat vertices[][2] = {
                { r.left,  height - r.top },
                { r.left,  height - r.bottom },
                { r.right, height - r.bottom },
                { r.right, height - r.top }
                { (GLfloat) r.left,  (GLfloat) (height - r.top) },
                { (GLfloat) r.left,  (GLfloat) (height - r.bottom) },
                { (GLfloat) r.right, (GLfloat) (height - r.bottom) },
                { (GLfloat) r.right, (GLfloat) (height - r.top) }
        };
        glVertexPointer(2, GL_FLOAT, 0, vertices);
        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);