Skip to content

Commit

Permalink
Remove IEX_THROW_SPEC
Browse files Browse the repository at this point in the history
This removes the macro and uses therein. We changed the API with
removing the subclass from std::string of Iex::BaseExc, so there is no
reason to retain this compatibility as well, especially since it isn't
really meaningful anyway in (modern) C++
  • Loading branch information
kdt3rd authored and nickrasmussen committed Aug 8, 2018
1 parent 36e8aef commit 47ea3f1
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 60 deletions.
40 changes: 16 additions & 24 deletions IlmBase/Imath/ImathMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,13 @@ template <class T> class Matrix33
//
//------------------------------------------------------------

const Matrix33 & invert (bool singExc = false)
IEX_THROW_SPEC (IEX_NAMESPACE::MathExc);
const Matrix33 & invert (bool singExc = false);

Matrix33<T> inverse (bool singExc = false) const
IEX_THROW_SPEC (IEX_NAMESPACE::MathExc);
Matrix33<T> inverse (bool singExc = false) const;

const Matrix33 & gjInvert (bool singExc = false)
IEX_THROW_SPEC (IEX_NAMESPACE::MathExc);
const Matrix33 & gjInvert (bool singExc = false);

Matrix33<T> gjInverse (bool singExc = false) const
IEX_THROW_SPEC (IEX_NAMESPACE::MathExc);
Matrix33<T> gjInverse (bool singExc = false) const;


//------------------------------------------------
Expand Down Expand Up @@ -636,17 +632,13 @@ template <class T> class Matrix44
//
//------------------------------------------------------------

const Matrix44 & invert (bool singExc = false)
IEX_THROW_SPEC (IEX_NAMESPACE::MathExc);
const Matrix44 & invert (bool singExc = false);

Matrix44<T> inverse (bool singExc = false) const
IEX_THROW_SPEC (IEX_NAMESPACE::MathExc);
Matrix44<T> inverse (bool singExc = false) const;

const Matrix44 & gjInvert (bool singExc = false)
IEX_THROW_SPEC (IEX_NAMESPACE::MathExc);
const Matrix44 & gjInvert (bool singExc = false);

Matrix44<T> gjInverse (bool singExc = false) const
IEX_THROW_SPEC (IEX_NAMESPACE::MathExc);
Matrix44<T> gjInverse (bool singExc = false) const;


//------------------------------------------------
Expand Down Expand Up @@ -1430,15 +1422,15 @@ Matrix33<T>::transposed () const

template <class T>
const Matrix33<T> &
Matrix33<T>::gjInvert (bool singExc) IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Matrix33<T>::gjInvert (bool singExc)
{
*this = gjInverse (singExc);
return *this;
}

template <class T>
Matrix33<T>
Matrix33<T>::gjInverse (bool singExc) const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Matrix33<T>::gjInverse (bool singExc) const
{
int i, j, k;
Matrix33 s;
Expand Down Expand Up @@ -1542,15 +1534,15 @@ Matrix33<T>::gjInverse (bool singExc) const IEX_THROW_SPEC (IEX_NAMESPACE::MathE

template <class T>
const Matrix33<T> &
Matrix33<T>::invert (bool singExc) IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Matrix33<T>::invert (bool singExc)
{
*this = inverse (singExc);
return *this;
}

template <class T>
Matrix33<T>
Matrix33<T>::inverse (bool singExc) const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Matrix33<T>::inverse (bool singExc) const
{
if (x[0][2] != 0 || x[1][2] != 0 || x[2][2] != 1)
{
Expand Down Expand Up @@ -2699,15 +2691,15 @@ Matrix44<T>::transposed () const

template <class T>
const Matrix44<T> &
Matrix44<T>::gjInvert (bool singExc) IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Matrix44<T>::gjInvert (bool singExc)
{
*this = gjInverse (singExc);
return *this;
}

template <class T>
Matrix44<T>
Matrix44<T>::gjInverse (bool singExc) const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Matrix44<T>::gjInverse (bool singExc) const
{
int i, j, k;
Matrix44 s;
Expand Down Expand Up @@ -2811,15 +2803,15 @@ Matrix44<T>::gjInverse (bool singExc) const IEX_THROW_SPEC (IEX_NAMESPACE::MathE

template <class T>
const Matrix44<T> &
Matrix44<T>::invert (bool singExc) IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Matrix44<T>::invert (bool singExc)
{
*this = inverse (singExc);
return *this;
}

template <class T>
Matrix44<T>
Matrix44<T>::inverse (bool singExc) const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Matrix44<T>::inverse (bool singExc) const
{
if (x[0][3] != 0 || x[1][3] != 0 || x[2][3] != 0 || x[3][3] != 1)
return gjInverse(singExc);
Expand Down
24 changes: 12 additions & 12 deletions IlmBase/Imath/ImathVec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Vec2<short>::normalize ()
template <>
IMATH_EXPORT
const Vec2<short> &
Vec2<short>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec2<short>::normalizeExc ()
{
if ((x == 0) && (y == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -180,7 +180,7 @@ Vec2<short>::normalized () const
template <>
IMATH_EXPORT
Vec2<short>
Vec2<short>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec2<short>::normalizedExc () const
{
if ((x == 0) && (y == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -225,7 +225,7 @@ Vec2<int>::normalize ()
template <>
IMATH_EXPORT
const Vec2<int> &
Vec2<int>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec2<int>::normalizeExc ()
{
if ((x == 0) && (y == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -256,7 +256,7 @@ Vec2<int>::normalized () const
template <>
IMATH_EXPORT
Vec2<int>
Vec2<int>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec2<int>::normalizedExc () const
{
if ((x == 0) && (y == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -301,7 +301,7 @@ Vec3<short>::normalize ()
template <>
IMATH_EXPORT
const Vec3<short> &
Vec3<short>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec3<short>::normalizeExc ()
{
if ((x == 0) && (y == 0) && (z == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -332,7 +332,7 @@ Vec3<short>::normalized () const
template <>
IMATH_EXPORT
Vec3<short>
Vec3<short>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec3<short>::normalizedExc () const
{
if ((x == 0) && (y == 0) && (z == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -377,7 +377,7 @@ Vec3<int>::normalize ()
template <>
IMATH_EXPORT
const Vec3<int> &
Vec3<int>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec3<int>::normalizeExc ()
{
if ((x == 0) && (y == 0) && (z == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -408,7 +408,7 @@ Vec3<int>::normalized () const
template <>
IMATH_EXPORT
Vec3<int>
Vec3<int>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec3<int>::normalizedExc () const
{
if ((x == 0) && (y == 0) && (z == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -453,7 +453,7 @@ Vec4<short>::normalize ()
template <>
IMATH_EXPORT
const Vec4<short> &
Vec4<short>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec4<short>::normalizeExc ()
{
if ((x == 0) && (y == 0) && (z == 0) && (w == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -484,7 +484,7 @@ Vec4<short>::normalized () const
template <>
IMATH_EXPORT
Vec4<short>
Vec4<short>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec4<short>::normalizedExc () const
{
if ((x == 0) && (y == 0) && (z == 0) && (w == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -529,7 +529,7 @@ Vec4<int>::normalize ()
template <>
IMATH_EXPORT
const Vec4<int> &
Vec4<int>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec4<int>::normalizeExc ()
{
if ((x == 0) && (y == 0) && (z == 0) && (w == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down Expand Up @@ -560,7 +560,7 @@ Vec4<int>::normalized () const
template <>
IMATH_EXPORT
Vec4<int>
Vec4<int>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
Vec4<int>::normalizedExc () const
{
if ((x == 0) && (y == 0) && (z == 0) && (w == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down
Loading

0 comments on commit 47ea3f1

Please sign in to comment.