diff --git a/src/gpu/vertexbuffer.h b/src/gpu/vertexbuffer.h index 8055a0b2..c6376fad 100644 --- a/src/gpu/vertexbuffer.h +++ b/src/gpu/vertexbuffer.h @@ -36,6 +36,10 @@ private: class VertexBufferData *m_data; }; +/* A safe enum to indicate how a vertex stream is going to be used. For + * now there is only TexCoord and not TexCoord0 TexCoord1 etc. because + * we can always reorganise the vertex declaration for the indices to + * match. If the need arises these enums will be added. */ struct VertexUsage { enum Value @@ -57,10 +61,12 @@ struct VertexUsage } m_value; - inline VertexUsage(Value v) { m_value = v; } + inline VertexUsage(Value v) : m_value(v) {} inline operator Value() { return m_value; } }; +/* A safe enum to indicate what kind of primitive to draw. Used in + * VertexDeclaration::DrawElements() for instance. */ struct MeshPrimitive { enum Value @@ -70,7 +76,7 @@ struct MeshPrimitive } m_value; - inline MeshPrimitive(Value v) { m_value = v; } + inline MeshPrimitive(Value v) : m_value(v) {} inline operator Value() { return m_value; } }; diff --git a/src/video.h b/src/video.h index 7dcc4f87..05f86483 100644 --- a/src/video.h +++ b/src/video.h @@ -27,7 +27,7 @@ struct ClearMask enum Value { /* Note: D3D9 doesn't appear to support the accumulation buffer, - * and it is a deprecated OpenGL feature. No reasone to support it. */ + * and it is a deprecated OpenGL feature. No reason to support it. */ Color = 1 << 0, Depth = 1 << 1, Stencil = 1 << 2, @@ -36,8 +36,8 @@ struct ClearMask } m_value; - inline ClearMask(Value v) { m_value = v; } - inline ClearMask(uint64_t i) { m_value = (Value)i; } + inline ClearMask(Value v) : m_value(v) {} + inline ClearMask(uint64_t i) : m_value((Value)i) {} inline operator Value() { return m_value; } };