diff --git a/include/Nazara/Math/Vector2.hpp b/include/Nazara/Math/Vector2.hpp index e0c060e21..373627cd8 100644 --- a/include/Nazara/Math/Vector2.hpp +++ b/include/Nazara/Math/Vector2.hpp @@ -55,9 +55,6 @@ class NzVector2 operator T*(); operator const T*() const; - T& operator[](unsigned int i); - T operator[](unsigned int i) const; - const NzVector2& operator+() const; NzVector2 operator-() const; diff --git a/include/Nazara/Math/Vector2.inl b/include/Nazara/Math/Vector2.inl index 5da704243..bf19c4af7 100644 --- a/include/Nazara/Math/Vector2.inl +++ b/include/Nazara/Math/Vector2.inl @@ -226,40 +226,6 @@ NzVector2::operator const T*() const return &x; } -template -T& NzVector2::operator[](unsigned int i) -{ - #if NAZARA_MATH_SAFE - if (i >= 2) - { - NzStringStream ss; - ss << "Index out of range: (" << i << " >= 2)"; - - NazaraError(ss); - throw std::domain_error(ss.ToString()); - } - #endif - - return *(&x+i); -} - -template -T NzVector2::operator[](unsigned int i) const -{ - #if NAZARA_MATH_SAFE - if (i >= 2) - { - NzStringStream ss; - ss << "Index out of range: (" << i << " >= 2)"; - - NazaraError(ss); - throw std::domain_error(ss.ToString()); - } - #endif - - return *(&x+i); -} - template const NzVector2& NzVector2::operator+() const { diff --git a/include/Nazara/Math/Vector3.hpp b/include/Nazara/Math/Vector3.hpp index fe2e33881..8a413c6af 100644 --- a/include/Nazara/Math/Vector3.hpp +++ b/include/Nazara/Math/Vector3.hpp @@ -67,9 +67,6 @@ template class NzVector3 operator T*(); operator const T*() const; - T& operator[](unsigned int i); - T operator[](unsigned int i) const; - const NzVector3& operator+() const; NzVector3 operator-() const; diff --git a/include/Nazara/Math/Vector3.inl b/include/Nazara/Math/Vector3.inl index a90410a0d..0d0b08335 100644 --- a/include/Nazara/Math/Vector3.inl +++ b/include/Nazara/Math/Vector3.inl @@ -306,40 +306,6 @@ NzVector3::operator const T*() const return &x; } -template -T& NzVector3::operator[](unsigned int i) -{ - #if NAZARA_MATH_SAFE - if (i >= 3) - { - NzStringStream ss; - ss << "Index out of range: (" << i << " >= 3)"; - - NazaraError(ss); - throw std::out_of_range(ss.ToString()); - } - #endif - - return *(&x+i); -} - -template -T NzVector3::operator[](unsigned int i) const -{ - #if NAZARA_MATH_SAFE - if (i >= 3) - { - NzStringStream ss; - ss << "Index out of range: (" << i << " >= 3)"; - - NazaraError(ss); - throw std::out_of_range(ss.ToString()); - } - #endif - - return *(&x+i); -} - template const NzVector3& NzVector3::operator+() const { diff --git a/include/Nazara/Math/Vector4.hpp b/include/Nazara/Math/Vector4.hpp index 90ad99664..7e30e71ee 100644 --- a/include/Nazara/Math/Vector4.hpp +++ b/include/Nazara/Math/Vector4.hpp @@ -50,9 +50,6 @@ template class NzVector4 operator T*(); operator const T*() const; - T& operator[](unsigned int i); - T operator[](unsigned int i) const; - const NzVector4& operator+() const; NzVector4 operator-() const; diff --git a/include/Nazara/Math/Vector4.inl b/include/Nazara/Math/Vector4.inl index 90a4da53a..77229fd5c 100644 --- a/include/Nazara/Math/Vector4.inl +++ b/include/Nazara/Math/Vector4.inl @@ -233,40 +233,6 @@ NzVector4::operator const T*() const return &x; } -template -T& NzVector4::operator[](unsigned int i) -{ - #if NAZARA_MATH_SAFE - if (i >= 4) - { - NzStringStream ss; - ss << "Index out of range: (" << i << " >= 4)"; - - NazaraError(ss); - throw std::domain_error(ss.ToString()); - } - #endif - - return *(&x+i); -} - -template -T NzVector4::operator[](unsigned int i) const -{ - #if NAZARA_MATH_SAFE - if (i >= 4) - { - NzStringStream ss; - ss << "Index out of range: (" << i << " >= 4)"; - - NazaraError(ss); - throw std::domain_error(ss.ToString()); - } - #endif - - return *(&x+i); -} - template const NzVector4& NzVector4::operator+() const {