summaryrefslogtreecommitdiff
path: root/libs/audiographer
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2012-07-02 15:48:29 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2012-07-02 15:48:29 +0000
commitd762be4f735ef69345fb4e221d6c53e3282810b8 (patch)
tree16806470562993ef78c5c1bb1bbc12f0510b8229 /libs/audiographer
parent5b5998208fa61113b7a691481d151bde021dae7d (diff)
Fix the ProcessContext copy-ctor stuff for older compilers, which don't support template base class initialization without template parameters
git-svn-id: svn://localhost/ardour2/branches/3.0@12983 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/audiographer')
-rw-r--r--libs/audiographer/audiographer/process_context.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/libs/audiographer/audiographer/process_context.h b/libs/audiographer/audiographer/process_context.h
index 576177ee14..15128ab4ea 100644
--- a/libs/audiographer/audiographer/process_context.h
+++ b/libs/audiographer/audiographer/process_context.h
@@ -15,6 +15,7 @@
namespace AudioGrapher
{
+
/**
* Processing context. Constness only applies to data, not flags
*/
@@ -23,6 +24,9 @@ template <typename T = DefaultSampleType>
class ProcessContext
: public Throwing<>
{
+ // Support older compilers that don't support template base class initialization without template parameters
+ // This will need to be modified if if it's modified above
+ static const ThrowLevel throwLevel = DEFAULT_THROW_LEVEL;
BOOST_STATIC_ASSERT (boost::has_trivial_destructor<T>::value);
@@ -43,25 +47,25 @@ public:
/// Normal copy constructor
ProcessContext (ProcessContext<T> const & other)
- : Throwing(), _data (other._data), _frames (other._frames), _channels (other._channels), _flags (other._flags)
+ : Throwing<throwLevel>(), _data (other._data), _frames (other._frames), _channels (other._channels), _flags (other._flags)
{ /* No need to validate data */ }
/// "Copy constructor" with unique data, frame and channel count, but copies flags
template<typename Y>
ProcessContext (ProcessContext<Y> const & other, T * data, framecnt_t frames, ChannelCount channels)
- : Throwing(), _data (data), _frames (frames), _channels (channels), _flags (other.flags())
+ : Throwing<throwLevel>(), _data (data), _frames (frames), _channels (channels), _flags (other.flags())
{ validate_data(); }
/// "Copy constructor" with unique data and frame count, but copies channel count and flags
template<typename Y>
ProcessContext (ProcessContext<Y> const & other, T * data, framecnt_t frames)
- : Throwing(), _data (data), _frames (frames), _channels (other.channels()), _flags (other.flags())
+ : Throwing<throwLevel>(), _data (data), _frames (frames), _channels (other.channels()), _flags (other.flags())
{ validate_data(); }
/// "Copy constructor" with unique data, but copies frame and channel count + flags
template<typename Y>
ProcessContext (ProcessContext<Y> const & other, T * data)
- : Throwing(), _data (data), _frames (other.frames()), _channels (other.channels()), _flags (other.flags())
+ : Throwing<throwLevel>(), _data (data), _frames (other.frames()), _channels (other.channels()), _flags (other.flags())
{ /* No need to validate data */ }
/// Make new Context out of the beginning of this context