summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-20 01:07:12 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-20 01:07:12 +0000
commit11dc98b4ffc22dedc019cf66fa81218a6adc179e (patch)
tree8a75825572218939adcc3138f36f66dce5c07c6a
parentRemove spare bits from shaders and tidy up (diff)
downloadilt-11dc98b4ffc22dedc019cf66fa81218a6adc179e.tar.bz2
ilt-11dc98b4ffc22dedc019cf66fa81218a6adc179e.tar.xz
ilt-11dc98b4ffc22dedc019cf66fa81218a6adc179e.zip
Pass a cppcheck
-rw-r--r--game/vehicles/vehicle.h2
-rw-r--r--gfx/gl/shader.cpp6
-rw-r--r--gfx/gl/shader.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/game/vehicles/vehicle.h b/game/vehicles/vehicle.h
index 945d43b..bbfa6ea 100644
--- a/game/vehicles/vehicle.h
+++ b/game/vehicles/vehicle.h
@@ -24,7 +24,7 @@ private:
class Vehicle : public WorldObject, public Renderable {
public:
- Vehicle(const LinkPtr & link, float linkDist = 0);
+ explicit Vehicle(const LinkPtr & link, float linkDist = 0);
float linkDist; // distance long current link
float speed {50}; // speed in m/s (~75 km/h)
diff --git a/gfx/gl/shader.cpp b/gfx/gl/shader.cpp
index 454ad4b..f80ab22 100644
--- a/gfx/gl/shader.cpp
+++ b/gfx/gl/shader.cpp
@@ -31,15 +31,15 @@ Shader::ProgramHandle::ProgramHandle(std::initializer_list<GLuint> srcs) : viewP
}
Shader::Shader() :
- programs {{{
+ programs {{ProgramHandle {
Source {{basicShader_vs, basicShader_vs_len}, GL_VERTEX_SHADER}.id,
Source {{basicShader_fs, basicShader_fs_len}, GL_FRAGMENT_SHADER}.id,
},
- {
+ ProgramHandle {
Source {{waterShader_vs, waterShader_vs_len}, GL_VERTEX_SHADER}.id,
Source {{waterShader_fs, waterShader_fs_len}, GL_FRAGMENT_SHADER}.id,
},
- {
+ ProgramHandle {
Source {{landmassShader_vs, landmassShader_vs_len}, GL_VERTEX_SHADER}.id,
Source {{landmassShader_fs, landmassShader_fs_len}, GL_FRAGMENT_SHADER}.id,
}}}
diff --git a/gfx/gl/shader.h b/gfx/gl/shader.h
index 5d26781..47a2b7d 100644
--- a/gfx/gl/shader.h
+++ b/gfx/gl/shader.h
@@ -32,7 +32,7 @@ private:
class ProgramHandle {
public:
- ProgramHandle(std::initializer_list<GLuint>);
+ explicit ProgramHandle(std::initializer_list<GLuint>);
using ProgramRef = glRef<GLuint, __glewCreateProgram, __glewDeleteProgram>;
ProgramRef m_program;