diff options
author | cutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475> | 2022-09-25 11:18:55 +0000 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-03-24 17:09:11 +0100 |
commit | a7f9afd2898a39cec175d877774b729c61630274 (patch) | |
tree | 170a7f8d4c772b76d98a4dd27e684cd87bb77835 | |
parent | 98df6eae77d646eb8958ce39988d2c0c8da0b1ba (diff) | |
download | irrlicht-a7f9afd2898a39cec175d877774b729c61630274.tar.xz |
Avoid ambigious conversions when compiling with c++20
Yay, more ugly casts needed.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6427 dfc29bdd-3216-0410-991c-e03cc46cb475
-rw-r--r-- | include/S3DVertex.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/S3DVertex.h b/include/S3DVertex.h index 3d78e20..aba81a7 100644 --- a/include/S3DVertex.h +++ b/include/S3DVertex.h @@ -25,7 +25,7 @@ enum E_VERTEX_TYPE EVT_2TCOORDS,
//! Vertex with a tangent and binormal vector, video::S3DVertexTangents.
- /** Usually used for tangent space normal mapping.
+ /** Usually used for tangent space normal mapping.
Usually tangent and binormal get send to shaders as texture coordinate sets 1 and 2.
*/
EVT_TANGENTS
@@ -150,21 +150,21 @@ struct S3DVertex2TCoords : public S3DVertex //! Equality operator
bool operator==(const S3DVertex2TCoords& other) const
{
- return ((static_cast<S3DVertex>(*this)==other) &&
+ return ((static_cast<S3DVertex>(*this)==static_cast<const S3DVertex&>(other)) &&
(TCoords2 == other.TCoords2));
}
//! Inequality operator
bool operator!=(const S3DVertex2TCoords& other) const
{
- return ((static_cast<S3DVertex>(*this)!=other) ||
+ return ((static_cast<S3DVertex>(*this)!=static_cast<const S3DVertex&>(other)) ||
(TCoords2 != other.TCoords2));
}
bool operator<(const S3DVertex2TCoords& other) const
{
return ((static_cast<S3DVertex>(*this) < other) ||
- ((static_cast<S3DVertex>(*this) == other) && (TCoords2 < other.TCoords2)));
+ ((static_cast<S3DVertex>(*this) == static_cast<const S3DVertex&>(other)) && (TCoords2 < other.TCoords2)));
}
static E_VERTEX_TYPE getType()
@@ -186,7 +186,7 @@ struct S3DVertex2TCoords : public S3DVertex //! Vertex with a tangent and binormal vector.
-/** Usually used for tangent space normal mapping.
+/** Usually used for tangent space normal mapping.
Usually tangent and binormal get send to shaders as texture coordinate sets 1 and 2.
*/
struct S3DVertexTangents : public S3DVertex
@@ -225,14 +225,14 @@ struct S3DVertexTangents : public S3DVertex bool operator==(const S3DVertexTangents& other) const
{
- return ((static_cast<S3DVertex>(*this)==other) &&
+ return ((static_cast<S3DVertex>(*this)==static_cast<const S3DVertex&>(other)) &&
(Tangent == other.Tangent) &&
(Binormal == other.Binormal));
}
bool operator!=(const S3DVertexTangents& other) const
{
- return ((static_cast<S3DVertex>(*this)!=other) ||
+ return ((static_cast<S3DVertex>(*this)!=static_cast<const S3DVertex&>(other)) ||
(Tangent != other.Tangent) ||
(Binormal != other.Binormal));
}
@@ -240,8 +240,8 @@ struct S3DVertexTangents : public S3DVertex bool operator<(const S3DVertexTangents& other) const
{
return ((static_cast<S3DVertex>(*this) < other) ||
- ((static_cast<S3DVertex>(*this) == other) && (Tangent < other.Tangent)) ||
- ((static_cast<S3DVertex>(*this) == other) && (Tangent == other.Tangent) && (Binormal < other.Binormal)));
+ ((static_cast<S3DVertex>(*this) == static_cast<const S3DVertex&>(other)) && (Tangent < other.Tangent)) ||
+ ((static_cast<S3DVertex>(*this) == static_cast<const S3DVertex&>(other)) && (Tangent == other.Tangent) && (Binormal < other.Binormal)));
}
static E_VERTEX_TYPE getType()
|