Merge remote-tracking branch 'upstream/master'

Former-commit-id: 124b89e1c31a7b907f88d8c7a234473274d5a0f6
This commit is contained in:
Gawaboumga
2014-06-28 09:05:16 +02:00
14 changed files with 14 additions and 125 deletions

View File

@@ -57,9 +57,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;

View File

@@ -235,40 +235,6 @@ NzVector2<T>::operator const T*() const
return &x;
}
template<typename T>
T& NzVector2<T>::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<typename T>
T NzVector2<T>::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<typename T>
const NzVector2<T>& NzVector2<T>::operator+() const
{

View File

@@ -69,9 +69,6 @@ template<typename T> 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;

View File

@@ -330,40 +330,6 @@ NzVector3<T>::operator const T*() const
return &x;
}
template<typename T>
T& NzVector3<T>::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<typename T>
T NzVector3<T>::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<typename T>
const NzVector3<T>& NzVector3<T>::operator+() const
{

View File

@@ -50,9 +50,6 @@ template<typename T> 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;

View File

@@ -233,40 +233,6 @@ NzVector4<T>::operator const T*() const
return &x;
}
template<typename T>
T& NzVector4<T>::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<typename T>
T NzVector4<T>::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<typename T>
const NzVector4<T>& NzVector4<T>::operator+() const
{