From 0a5cbe656f301e2a16333fba471c4b4194707eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Thu, 23 Nov 2017 13:21:51 +0100 Subject: [PATCH] Math/VectorI: Make array/pointer constructor explicit --- SDK/include/NDK/Widgets/TextAreaWidget.inl | 4 ++-- include/Nazara/Math/Vector2.hpp | 2 +- include/Nazara/Math/Vector3.hpp | 2 +- include/Nazara/Math/Vector4.hpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SDK/include/NDK/Widgets/TextAreaWidget.inl b/SDK/include/NDK/Widgets/TextAreaWidget.inl index 100c61b6e..29b7cff98 100644 --- a/SDK/include/NDK/Widgets/TextAreaWidget.inl +++ b/SDK/include/NDK/Widgets/TextAreaWidget.inl @@ -8,7 +8,7 @@ namespace Ndk { inline void TextAreaWidget::Clear() { - m_cursorPosition = 0; + m_cursorPosition.MakeZero(); m_drawer.Clear(); m_textSprite->Update(m_drawer); @@ -119,7 +119,7 @@ namespace Ndk OnTextAreaCursorMove(this, &glyphIndex); glyphIndex = std::min(glyphIndex, m_drawer.GetGlyphCount()); - + std::size_t lineCount = m_drawer.GetLineCount(); std::size_t line = 0U; for (std::size_t i = line + 1; i < lineCount; ++i) diff --git a/include/Nazara/Math/Vector2.hpp b/include/Nazara/Math/Vector2.hpp index ecbd5e4fe..5bb5573ba 100644 --- a/include/Nazara/Math/Vector2.hpp +++ b/include/Nazara/Math/Vector2.hpp @@ -24,7 +24,7 @@ namespace Nz Vector2() = default; Vector2(T X, T Y); explicit Vector2(T scale); - Vector2(const T vec[2]); + explicit Vector2(const T vec[2]); template explicit Vector2(const Vector2& vec); Vector2(const Vector2& vec) = default; explicit Vector2(const Vector3& vec); diff --git a/include/Nazara/Math/Vector3.hpp b/include/Nazara/Math/Vector3.hpp index 8cfe59397..acb87d6c1 100644 --- a/include/Nazara/Math/Vector3.hpp +++ b/include/Nazara/Math/Vector3.hpp @@ -25,7 +25,7 @@ namespace Nz Vector3(T X, T Y, T Z); Vector3(T X, const Vector2& vec); explicit Vector3(T scale); - Vector3(const T vec[3]); + explicit Vector3(const T vec[3]); Vector3(const Vector2& vec, T Z = 0.0); template explicit Vector3(const Vector3& vec); Vector3(const Vector3& vec) = default; diff --git a/include/Nazara/Math/Vector4.hpp b/include/Nazara/Math/Vector4.hpp index c39c0b250..de04884e1 100644 --- a/include/Nazara/Math/Vector4.hpp +++ b/include/Nazara/Math/Vector4.hpp @@ -27,7 +27,7 @@ namespace Nz Vector4(T X, const Vector2& vec, T W); Vector4(T X, const Vector3& vec); explicit Vector4(T scale); - Vector4(const T vec[4]); + explicit Vector4(const T vec[4]); Vector4(const Vector2& vec, T Z = 0.0, T W = 1.0); Vector4(const Vector3& vec, T W = 1.0); template explicit Vector4(const Vector4& vec);