From a5f7e93358e90dd81529288c9fcb7f93512ee07a Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 26 Dec 2015 13:26:51 +0100 Subject: [PATCH] Fixed: GCC warnings --- code/nel/src/3d/quad_effect.cpp | 15 +++++++-------- code/nel/src/3d/water_model.cpp | 3 +++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/code/nel/src/3d/quad_effect.cpp b/code/nel/src/3d/quad_effect.cpp index ab9fd91b8..8b40a786c 100644 --- a/code/nel/src/3d/quad_effect.cpp +++ b/code/nel/src/3d/quad_effect.cpp @@ -56,19 +56,17 @@ void CQuadEffect::makeRasters(const TPoint2DVect &poly { dest.clear(); - const float epsilon = 10E-5f; + startY = 0.f; sint size = (sint)poly.size(); + + if (!size) return; + + const float epsilon = 10E-5f; uint aelSize = 0; // size of active edge list sint k; // loop counter - - - dest.clear(); - - if (!size) return; - static TEdgeList lel, ael; // the left edge list, and the active edge list float highest = poly[0].y; lel.clear(); @@ -217,7 +215,8 @@ void CQuadEffect::makeRasters(const TPoint2DVect &poly currY += quadHeight; - } while (size || aelSize); + } + while (size || aelSize); } //** diff --git a/code/nel/src/3d/water_model.cpp b/code/nel/src/3d/water_model.cpp index eb8ceae27..fb53100cb 100644 --- a/code/nel/src/3d/water_model.cpp +++ b/code/nel/src/3d/water_model.cpp @@ -1640,6 +1640,9 @@ void CWaterModel::traverseRender() for(sint k = 0; k < (sint) poly.Vertices.size() - 2; ++k) { NLMISC::CTriangleUV truv; + truv.Uv0.set(0.f, 0.f); + truv.Uv1.set(0.f, 0.f); + truv.Uv2.set(0.f, 0.f); truv.V0.set(poly.Vertices[0].x, poly.Vertices[0].y, 0.f); truv.V1.set(poly.Vertices[k + 1].x, poly.Vertices[k + 1].y, 0.f); truv.V2.set(poly.Vertices[k + 2].x, poly.Vertices[k + 2].y, 0.f);