Skip to content

Commit

Permalink
use dynamic exception macro to avoid warnings in c++14 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kdt3rd authored and nickrasmussen committed Aug 8, 2018
1 parent f257dc0 commit 5a966a0
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 52 deletions.
32 changes: 16 additions & 16 deletions IlmBase/Imath/ImathMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,16 +263,16 @@ template <class T> class Matrix33
//------------------------------------------------------------

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

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

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

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


//------------------------------------------------
Expand Down Expand Up @@ -637,16 +637,16 @@ template <class T> class Matrix44
//------------------------------------------------------------

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

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

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

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


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

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

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

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

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

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

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

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

template <class T>
Matrix44<T>
Matrix44<T>::inverse (bool singExc) const throw (IEX_NAMESPACE::MathExc)
Matrix44<T>::inverse (bool singExc) const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 () throw (IEX_NAMESPACE::MathExc)
Vec2<short>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 throw (IEX_NAMESPACE::MathExc)
Vec2<short>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 () throw (IEX_NAMESPACE::MathExc)
Vec2<int>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 throw (IEX_NAMESPACE::MathExc)
Vec2<int>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 () throw (IEX_NAMESPACE::MathExc)
Vec3<short>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 throw (IEX_NAMESPACE::MathExc)
Vec3<short>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 () throw (IEX_NAMESPACE::MathExc)
Vec3<int>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 throw (IEX_NAMESPACE::MathExc)
Vec3<int>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 () throw (IEX_NAMESPACE::MathExc)
Vec4<short>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 throw (IEX_NAMESPACE::MathExc)
Vec4<short>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 () throw (IEX_NAMESPACE::MathExc)
Vec4<int>::normalizeExc () IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
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 throw (IEX_NAMESPACE::MathExc)
Vec4<int>::normalizedExc () const IEX_THROW_SPEC (IEX_NAMESPACE::MathExc)
{
if ((x == 0) && (y == 0) && (z == 0) && (w == 0))
throw NullVecExc ("Cannot normalize null vector.");
Expand Down

0 comments on commit 5a966a0

Please sign in to comment.