Skip to content
Snippets Groups Projects
Commit fff685ba authored by Andreas Schenk's avatar Andreas Schenk
Browse files

made Point(const Vec2& v) and Point(const Vec3& v) ctors explicit to

avoid ambiguous implicit conversions
parent 26c0f9b9
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
} }
//! conversion from Vec2 //! conversion from Vec2
Point(const Vec2& v): explicit Point(const Vec2& v):
x(static_cast<int>(round(v[0]))), x(static_cast<int>(round(v[0]))),
y(static_cast<int>(round(v[1]))), y(static_cast<int>(round(v[1]))),
z() z()
...@@ -95,7 +95,7 @@ public: ...@@ -95,7 +95,7 @@ public:
//! conversion from Vec3 //! conversion from Vec3
Point(const Vec3& v): explicit Point(const Vec3& v):
x(static_cast<int>(round(v[0]))), x(static_cast<int>(round(v[0]))),
y(static_cast<int>(round(v[1]))), y(static_cast<int>(round(v[1]))),
z(static_cast<int>(round(v[2]))) z(static_cast<int>(round(v[2])))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment