summaryrefslogtreecommitdiffstats
path: root/src/graphics/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/core')
-rw-r--r--src/graphics/core/color.h2
-rw-r--r--src/graphics/core/vertex.h22
2 files changed, 12 insertions, 12 deletions
diff --git a/src/graphics/core/color.h b/src/graphics/core/color.h
index ff8a2eb..bcd0af1 100644
--- a/src/graphics/core/color.h
+++ b/src/graphics/core/color.h
@@ -35,7 +35,7 @@ struct Color
float r, g, b, a;
//! Constructor; default values are (0,0,0,0) = black
- Color(float aR = 0.0f, float aG = 0.0f, float aB = 0.0f, float aA = 0.0f)
+ explicit Color(float aR = 0.0f, float aG = 0.0f, float aB = 0.0f, float aA = 0.0f)
: r(aR), g(aG), b(aB), a(aA) {}
inline Gfx::Color Inverse() const
diff --git a/src/graphics/core/vertex.h b/src/graphics/core/vertex.h
index 53dd642..a99d618 100644
--- a/src/graphics/core/vertex.h
+++ b/src/graphics/core/vertex.h
@@ -47,9 +47,9 @@ struct Vertex
Math::Vector normal;
Math::Point texCoord;
- Vertex(Math::Vector aCoord = Math::Vector(),
- Math::Vector aNormal = Math::Vector(),
- Math::Point aTexCoord = Math::Point())
+ explicit Vertex(Math::Vector aCoord = Math::Vector(),
+ Math::Vector aNormal = Math::Vector(),
+ Math::Point aTexCoord = Math::Point())
: coord(aCoord), normal(aNormal), texCoord(aTexCoord) {}
@@ -83,10 +83,10 @@ struct VertexCol
Gfx::Color specular;
Math::Point texCoord;
- VertexCol(Math::Vector aCoord = Math::Vector(),
- Gfx::Color aColor = Gfx::Color(),
- Gfx::Color aSpecular = Gfx::Color(),
- Math::Point aTexCoord = Math::Point())
+ explicit VertexCol(Math::Vector aCoord = Math::Vector(),
+ Gfx::Color aColor = Gfx::Color(),
+ Gfx::Color aSpecular = Gfx::Color(),
+ Math::Point aTexCoord = Math::Point())
: coord(aCoord), color(aColor), specular(aSpecular), texCoord(aTexCoord) {}
//! Returns a string "(c: [...], col: [...], sp: [...], tc: [...])"
@@ -115,10 +115,10 @@ struct VertexTex2
Math::Point texCoord;
Math::Point texCoord2;
- VertexTex2(Math::Vector aCoord = Math::Vector(),
- Math::Vector aNormal = Math::Vector(),
- Math::Point aTexCoord = Math::Point(),
- Math::Point aTexCoord2 = Math::Point())
+ explicit VertexTex2(Math::Vector aCoord = Math::Vector(),
+ Math::Vector aNormal = Math::Vector(),
+ Math::Point aTexCoord = Math::Point(),
+ Math::Point aTexCoord2 = Math::Point())
: coord(aCoord), normal(aNormal), texCoord(aTexCoord), texCoord2(aTexCoord2) {}
//! Sets the fields from Gfx::Vertex with texCoord2 = (0,0)