From fbdd160061324f930ba253b78cdf2d05dfce02e1 Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Wed, 14 Jan 2015 13:10:25 +0000 Subject: [PATCH] Fix destructor exception-permissiveness errors in a less idiotic way --- Source/Ember/RendererBase.cpp | 1 + Source/Ember/RendererBase.h | 4 ++-- Source/Ember/Utils.h | 2 +- Source/EmberCL/RendererCL.h | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/Ember/RendererBase.cpp b/Source/Ember/RendererBase.cpp index 9293b5b..f1f7b69 100644 --- a/Source/Ember/RendererBase.cpp +++ b/Source/Ember/RendererBase.cpp @@ -8,6 +8,7 @@ namespace EmberNs /// The thread count is set to the number of cores detected on the system. /// RendererBase::RendererBase() + :m_TaskGroup(new tbb::task_group) { m_Abort = false; m_LockAccum = false; diff --git a/Source/Ember/RendererBase.h b/Source/Ember/RendererBase.h index d70545c..d9afe76 100644 --- a/Source/Ember/RendererBase.h +++ b/Source/Ember/RendererBase.h @@ -94,7 +94,7 @@ class EMBER_API RendererBase : public EmberReport //using EmberReport::m_ErrorReport; public: RendererBase(); - virtual ~RendererBase() __TBB_NOEXCEPT(false) { } + virtual ~RendererBase() { } //Non-virtual processing functions. void ChangeVal(std::function func, eProcessAction action); @@ -222,7 +222,7 @@ protected: vector m_SubBatch; vector m_BadVals; vector> m_Rand; - tbb::task_group m_TaskGroup; + auto_ptr m_TaskGroup; CriticalSection m_RenderingCs, m_AccumCs, m_FinalAccumCs, m_ResizeCs; Timing m_RenderTimer, m_IterTimer, m_ProgressTimer; }; diff --git a/Source/Ember/Utils.h b/Source/Ember/Utils.h index 3fa46ad..dbfa5f0 100644 --- a/Source/Ember/Utils.h +++ b/Source/Ember/Utils.h @@ -90,7 +90,7 @@ public: /// /// Virtual destructor needed for virtual classes. /// - virtual ~EmberReport() __TBB_NOEXCEPT(false) { } + virtual ~EmberReport() { } /// /// Write the entire error report as a single string to the console. diff --git a/Source/EmberCL/RendererCL.h b/Source/EmberCL/RendererCL.h index cb4475f..1478851 100644 --- a/Source/EmberCL/RendererCL.h +++ b/Source/EmberCL/RendererCL.h @@ -18,7 +18,7 @@ namespace EmberCLns class EMBERCL_API RendererCLBase { public: - virtual ~RendererCLBase() __TBB_NOEXCEPT(false) { } + virtual ~RendererCLBase() { } virtual bool ReadFinal(byte* pixels) = 0; virtual bool ClearFinal() = 0; }; @@ -83,7 +83,7 @@ using EmberNs::Renderer::XformDistributionsSize; public: RendererCL(uint platform = 0, uint device = 0, bool shared = false, GLuint outputTexID = 0); - ~RendererCL() __TBB_NOEXCEPT(false); + ~RendererCL(); //Non-virtual member functions for OpenCL specific tasks. bool Init(uint platform, uint device, bool shared, GLuint outputTexID);