diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-07-28 13:36:03 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-07-28 13:36:03 +0400 |
commit | 7296600434c49b40215ba842af73a8b1517e12eb (patch) | |
tree | ba41a61f147073c91cf370c1f470b7c519397766 /intern/audaspace/FX/AUD_SquareFactory.cpp | |
parent | 3e3f874a65e9c20353fdc26a20a2f5da9b41e90e (diff) |
Audaspace: HUGE Refactor.
Some points of the refactor not sorted by importance:
* Fixed immutability of readers and factories (there are exceptions...)
* Fixed copy constructors and = operators
* Removed messaging system
* Removed reader types
* Added const where possible
* Using initalisers when possible
* Avoided use of pointers when possible
* Removed AUD_NEW and AUD_DELETE macros
* Removed useless NULL pointer checks
* Fixed exception catching
* Fixed some yet unknown bugs
* Lots of other stuff
Diffstat (limited to 'intern/audaspace/FX/AUD_SquareFactory.cpp')
-rw-r--r-- | intern/audaspace/FX/AUD_SquareFactory.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/intern/audaspace/FX/AUD_SquareFactory.cpp b/intern/audaspace/FX/AUD_SquareFactory.cpp index 638acaa9a32..b95c9d9bb0f 100644 --- a/intern/audaspace/FX/AUD_SquareFactory.cpp +++ b/intern/audaspace/FX/AUD_SquareFactory.cpp @@ -28,30 +28,16 @@ AUD_SquareFactory::AUD_SquareFactory(AUD_IFactory* factory, float threshold) : AUD_EffectFactory(factory), - m_threshold(threshold) {} - -AUD_SquareFactory::AUD_SquareFactory(float threshold) : - AUD_EffectFactory(0), - m_threshold(threshold) {} - -float AUD_SquareFactory::getThreshold() + m_threshold(threshold) { - return m_threshold; } -void AUD_SquareFactory::setThreshold(float threshold) +float AUD_SquareFactory::getThreshold() const { - m_threshold = threshold; + return m_threshold; } -AUD_IReader* AUD_SquareFactory::createReader() +AUD_IReader* AUD_SquareFactory::createReader() const { - AUD_IReader* reader = getReader(); - - if(reader != 0) - { - reader = new AUD_SquareReader(reader, m_threshold); AUD_NEW("reader") - } - - return reader; + return new AUD_SquareReader(getReader(), m_threshold); } |