From 2e3512b80098eb0c3facd4fd3ab6433fe424c4f7 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 19 Aug 2015 16:51:47 -1000 Subject: [PATCH] Removed exceptions --- include/CProjection.hpp | 12 +++++++++--- src/CProjection.cpp | 6 +++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/include/CProjection.hpp b/include/CProjection.hpp index e29c05d..d4e7ec9 100644 --- a/include/CProjection.hpp +++ b/include/CProjection.hpp @@ -3,7 +3,7 @@ #include "Global.hpp" #include "CMatrix4f.hpp" -#include +#include #define _USE_MATH_DEFINES 1 #include @@ -65,13 +65,19 @@ public: inline const SProjOrtho& getOrtho() const { if (m_projType != PROJ_ORTHO) - throw std::runtime_error("attempted to access orthographic structure of non-ortho projection"); + { + fprintf(stderr, "attempted to access orthographic structure of non-ortho projection"); + abort(); + } return m_ortho; } inline const SProjPersp& getPersp() const { if (m_projType != PROJ_PERSP) - throw std::runtime_error("attempted to access perspective structure of non-persp projection"); + { + fprintf(stderr, "attempted to access perspective structure of non-persp projection"); + abort(); + } return m_persp; } diff --git a/src/CProjection.cpp b/src/CProjection.cpp index 42cde8d..cdae359 100644 --- a/src/CProjection.cpp +++ b/src/CProjection.cpp @@ -1,5 +1,6 @@ #include "CProjection.hpp" #include +#include void CProjection::_updateCachedMatrix() { @@ -59,6 +60,9 @@ void CProjection::_updateCachedMatrix() m_mtx.m[3][3] = 0.0f; } else - throw std::runtime_error("attempted to cache invalid projection type"); + { + fprintf(stderr, "attempted to cache invalid projection type"); + abort(); + } }