From 720705bd6b2da31131a3844762b60a83a65fd011 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sat, 19 Mar 2016 12:33:54 +1300 Subject: [PATCH] Some colobot-lint fixes --- src/graphics/engine/engine.cpp | 6 +++--- src/graphics/opengl/glutil.cpp | 2 +- src/graphics/opengl/glutil.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 309a0f9d..3effebbd 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -3394,9 +3394,9 @@ void CEngine::DrawCrashSpheres() SetState(ENG_RSTATE_OPAQUE_COLOR); - const int LINE_SEGMENTS = 32; - const int LONGITUDE_DIVISIONS = 16; - const int LATITUDE_DIVISIONS = 8; + static const int LINE_SEGMENTS = 32; + static const int LONGITUDE_DIVISIONS = 16; + static const int LATITUDE_DIVISIONS = 8; VertexCol line[LINE_SEGMENTS]; Color color(0.0f, 0.0f, 1.0f); diff --git a/src/graphics/opengl/glutil.cpp b/src/graphics/opengl/glutil.cpp index 06135e4e..95c1f24f 100644 --- a/src/graphics/opengl/glutil.cpp +++ b/src/graphics/opengl/glutil.cpp @@ -628,7 +628,7 @@ PreparedTextureData PrepareTextureData(ImageData* imageData, TexImgFormat format if (convert) { - SDL_PixelFormat format; + SDL_PixelFormat format = {}; format.BytesPerPixel = 4; format.BitsPerPixel = 32; format.Aloss = format.Bloss = format.Gloss = format.Rloss = 0; diff --git a/src/graphics/opengl/glutil.h b/src/graphics/opengl/glutil.h index 6fbb9658..2da4cf20 100644 --- a/src/graphics/opengl/glutil.h +++ b/src/graphics/opengl/glutil.h @@ -108,7 +108,7 @@ struct PreparedTextureData bool alpha = false; }; -PreparedTextureData PrepareTextureData(ImageData* data, TexImgFormat format); +PreparedTextureData PrepareTextureData(ImageData* imageData, TexImgFormat format); class CGLFrameBufferPixels : public CFrameBufferPixels {