diff --git a/src/projectM-engine/CustomWave.cpp b/src/projectM-engine/CustomWave.cpp index 84342c15c..aec12f6d6 100755 --- a/src/projectM-engine/CustomWave.cpp +++ b/src/projectM-engine/CustomWave.cpp @@ -62,8 +62,7 @@ CustomWave::CustomWave(int _id): scaling(1.0), per_frame_eqn_string_index(0), per_frame_init_eqn_string_index(0), - per_point_eqn_string_index(0), - param_tree(new std::map()) + per_point_eqn_string_index(0) { Param * param; @@ -87,7 +86,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, ¶m_tree) < 0) { /// @bug make exception abort(); } @@ -98,7 +97,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, param_tree) < 0) { + if (ParamUtils::insert(param, ¶m_tree) < 0) { delete(this); /// @bug make exception abort(); @@ -111,7 +110,7 @@ CustomWave::CustomWave(int _id): } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); /// @bug make exception abort(); @@ -123,7 +122,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); /// @bug make exception abort(); @@ -135,7 +134,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); /// @bug make exception abort(); @@ -147,7 +146,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); /// @bug make exception @@ -163,7 +162,7 @@ CustomWave::CustomWave(int _id): } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); /// @bug make exception @@ -179,7 +178,7 @@ CustomWave::CustomWave(int _id): } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); /// @bug make exception abort(); @@ -195,7 +194,7 @@ CustomWave::CustomWave(int _id): } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); /// @bug make exception abort(); @@ -210,7 +209,7 @@ CustomWave::CustomWave(int _id): } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); /// @bug make exception abort(); @@ -223,7 +222,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -233,7 +232,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -243,7 +242,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -254,7 +253,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { printf("failed to insert sample\n"); delete(this); abort(); @@ -265,7 +264,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -275,7 +274,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -285,7 +284,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -295,7 +294,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -305,7 +304,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -315,7 +314,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -325,7 +324,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -334,7 +333,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -343,7 +342,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -352,7 +351,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -361,7 +360,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -371,7 +370,7 @@ CustomWave::CustomWave(int _id): abort(); } - if (ParamUtils::insert(param, this->param_tree) < 0) { + if (ParamUtils::insert(param, &this->param_tree) < 0) { delete(this); abort(); } @@ -384,9 +383,6 @@ CustomWave::CustomWave(int _id): CustomWave::~CustomWave() { - if (param_tree == NULL) - return; - for (std::map::iterator pos = per_point_eqn_tree.begin(); pos != per_point_eqn_tree.end(); ++pos) delete(pos->second); @@ -400,12 +396,9 @@ CustomWave::~CustomWave() { for (std::map::iterator pos = per_frame_init_eqn_tree.begin(); pos != per_frame_init_eqn_tree.end(); ++pos) delete(pos->second); - for (std::map::iterator pos = param_tree->begin(); pos != param_tree->end(); ++pos) + for (std::map::iterator pos = param_tree.begin(); pos != param_tree.end(); ++pos) delete(pos->second); - - delete(param_tree); - free(r_mesh); free(g_mesh); free(b_mesh); @@ -449,7 +442,7 @@ int CustomWave::add_per_point_eqn(char * name, GenExpr * gen_expr) { /* Search for the parameter so we know what matrix the per pixel equation is referencing */ - if ((param = ParamUtils::find(name,param_tree)) == NULL) { + if ((param = ParamUtils::find(name,¶m_tree)) == NULL) { if (CUSTOM_WAVE_DEBUG) printf("add_per_point_eqn: failed to allocate a new parameter!\n"); return PROJECTM_FAILURE; @@ -510,7 +503,7 @@ void CustomWave::evalPerPointEqns() { void CustomWave::load_unspecified_init_conds() { InitCondUtils::LoadUnspecInitCond fun(this->init_cond_tree, this->per_frame_init_eqn_tree); - Algorithms::traverse(*param_tree, fun); + Algorithms::traverse(param_tree, fun); } diff --git a/src/projectM-engine/CustomWave.hpp b/src/projectM-engine/CustomWave.hpp index 3e6b2767d..c9b4676da 100755 --- a/src/projectM-engine/CustomWave.hpp +++ b/src/projectM-engine/CustomWave.hpp @@ -67,7 +67,7 @@ public: int per_frame_count; /* Parameter tree associated with this custom wave */ - std::map * param_tree; + std::map param_tree; /* Engine variables */ float x; /* x position for per point equations */ @@ -142,17 +142,4 @@ public: }; -/** Splaytree traversal helpers */ -inline void free_custom_wave_helper( void *custom_wave ) { - delete((CustomWave *)custom_wave); - } - -inline void load_custom_wave_init_helper( void *custom_wave ) { - ((CustomWave *)custom_wave)->load_unspecified_init_conds(); - } - -inline void eval_custom_wave_init_conds_helper( void *custom_wave ) { - ((CustomWave *)custom_wave)->eval_custom_wave_init_conds(); - } - #endif /** !_CUSTOM_WAVE_H */ diff --git a/src/projectM-engine/Parser.cpp b/src/projectM-engine/Parser.cpp index edf470db9..a22dcdd0b 100755 --- a/src/projectM-engine/Parser.cpp +++ b/src/projectM-engine/Parser.cpp @@ -743,9 +743,9 @@ GenExpr * Parser::parse_gen_expr ( FILE * fs, TreeExpr * tree_expr, Preset * pre /* CASE 5: custom wave variable */ if (current_wave != NULL) { - if ((param = ParamUtils::find(std::string(string), current_wave->param_tree)) == NULL) { + if ((param = ParamUtils::find(std::string(string), ¤t_wave->param_tree)) == NULL) { if ((param = preset->builtinParams.find_builtin_param(std::string(string))) == NULL) - if ((param = ParamUtils::find(std::string(string), current_wave->param_tree)) == NULL) { + if ((param = ParamUtils::find(std::string(string), ¤t_wave->param_tree)) == NULL) { if (tree_expr) delete tree_expr; return NULL; @@ -1416,7 +1416,7 @@ int Parser::parse_wavecode(char * token, FILE * fs, Preset * preset) { //if (PARSE_DEBUG) printf("parse_wavecode: custom wave found (id = %d)\n", custom_wave->id); /* Retrieve parameter from this custom waves parameter db */ - if ((param = ParamUtils::find(var_string,custom_wave->param_tree)) == NULL) + if ((param = ParamUtils::find(var_string,&custom_wave->param_tree)) == NULL) return PROJECTM_FAILURE; //if (PARSE_DEBUG) printf("parse_wavecode: custom wave parameter found (name = %s)\n", param->name); @@ -1753,7 +1753,7 @@ int Parser::parse_wave_helper(FILE * fs, Preset * preset, int id, char * eqn_ty if (PARSE_DEBUG) printf("parse_wave_helper (per frame init): [begin] (LINE %d)\n", line_count); /* Parse the per frame init equation */ - if ((init_cond = parse_per_frame_init_eqn(fs, preset, custom_wave->param_tree)) == NULL) { + if ((init_cond = parse_per_frame_init_eqn(fs, preset, &custom_wave->param_tree)) == NULL) { if (PARSE_DEBUG) printf("parse_wave_helper (per frame init): equation parsing failed (LINE %d)\n", line_count); return PROJECTM_PARSE_ERROR; } @@ -1783,7 +1783,7 @@ int Parser::parse_wave_helper(FILE * fs, Preset * preset, int id, char * eqn_ty } /* Find the parameter associated with the string in the custom wave database */ - if ((param = ParamUtils::find(string, custom_wave->param_tree)) == NULL) { + if ((param = ParamUtils::find(string, &custom_wave->param_tree)) == NULL) { //if (PARSE_DEBUG) printf("parse_wave (per_frame): parameter \"%s\" not found or cannot be wipemalloc'ed!!\n", string); return PROJECTM_FAILURE; } @@ -2107,7 +2107,7 @@ char string[MAX_TOKEN_SIZE]; } /* Find the parameter associated with the string in the custom shape database */ - if ((param = ParamUtils::find(string, custom_wave->param_tree)) == NULL) { + if ((param = ParamUtils::find(string, &custom_wave->param_tree)) == NULL) { //if (PARSE_DEBUG) printf("parse_shape (per_frame): parameter \"%s\" not found or cannot be wipemalloc'ed!!\n", string); return PROJECTM_FAILURE; } diff --git a/src/projectM-engine/PerFrameEqn.cpp b/src/projectM-engine/PerFrameEqn.cpp index 592b7b343..2a12b9474 100755 --- a/src/projectM-engine/PerFrameEqn.cpp +++ b/src/projectM-engine/PerFrameEqn.cpp @@ -40,8 +40,8 @@ void PerFrameEqn::evaluate() { if (PER_FRAME_EQN_DEBUG) { printf("per_frame_%d=%s= ", index, param->name.c_str()); - fflush(stdout); - } + fflush(stdout); + } //*((float*)per_frame_eqn->param->engine_val) = eval_gen_expr(per_frame_eqn->gen_expr); assert(gen_expr); @@ -57,7 +57,8 @@ PerFrameEqn::~PerFrameEqn() { delete gen_expr; - /** @bug Destroy param? - great question, don't know yet*/ + // param is freed in param_tree container of some other class + } /* Create a new per frame equation */ diff --git a/src/projectM-engine/PerPixelEqn.cpp b/src/projectM-engine/PerPixelEqn.cpp index 25f739800..f35e8c821 100755 --- a/src/projectM-engine/PerPixelEqn.cpp +++ b/src/projectM-engine/PerPixelEqn.cpp @@ -58,7 +58,7 @@ void PerPixelEqn::evaluate() { for (y = 0; y < param->gy; y++) { /// @slow is this necessary? param_matrix[x][y] = 0.0; - } + } this->param->matrix = param_matrix; } diff --git a/src/projectM-engine/PresetChooser.hpp b/src/projectM-engine/PresetChooser.hpp index e5152dc2d..f4ee93060 100644 --- a/src/projectM-engine/PresetChooser.hpp +++ b/src/projectM-engine/PresetChooser.hpp @@ -47,7 +47,7 @@ public: /// \param presetInputs the preset inputs to associate with the preset upon construction /// \param presetOutputs the preset outputs to associate with the preset upon construction /// \returns a pointer of the newly allocated preset - Preset * allocate(const PresetInputs & presetInputs, PresetOutputs & presetOutputs); + std::auto_ptr allocate(const PresetInputs & presetInputs, PresetOutputs & presetOutputs); /// Set the chooser asocciated with this iterator void setChooser(const PresetChooser & chooser); @@ -73,7 +73,7 @@ public: /// \param index An index lying in the interval [0, this->getNumPresets()] /// \param presetInputs the preset inputs to associate with the preset upon construction /// \param presetOutputs the preset outputs to associate with the preset upon construction - Preset * directoryIndex(std::size_t index, const PresetInputs & presetInputs, + std::auto_ptr directoryIndex(std::size_t index, const PresetInputs & presetInputs, PresetOutputs & presetOutputs) const; /// Gets the number of presets last believed to exist in the preset loader's filename collection @@ -112,7 +112,7 @@ public: /// \param WeightFuncstor a functor that returns a probability for each index (see UniformRandomFunctor) /// \returns an pointer of the newly allocated preset - you must free this object! template - Preset * weightedRandom(const PresetInputs & presetInputs, PresetOutputs & presetOutputs, WeightFunctor & weightFunctor); + std::auto_ptr weightedRandom(const PresetInputs & presetInputs, PresetOutputs & presetOutputs, WeightFunctor & weightFunctor); /// Do a weighted sample given a weight functor and default construction (ie. element size) of the weight functor @@ -121,11 +121,11 @@ public: /// \param WeightFunctor a functor that returns a probability for each index (see UniformRandomFunctor) /// \returns a pointer of the newly allocated preset - you must free this object! template - Preset * weightedRandom(const PresetInputs & presetInputs, PresetOutputs & preseOutputs); + std::auto_ptr weightedRandom(const PresetInputs & presetInputs, PresetOutputs & preseOutputs); private: template - Preset * doWeightedSample(WeightFunctor & weightFunctor, const PresetInputs & presetInputs, PresetOutputs & presetOutputs); + std::auto_ptr doWeightedSample(WeightFunctor & weightFunctor, const PresetInputs & presetInputs, PresetOutputs & presetOutputs); const PresetLoader * m_presetLoader; }; @@ -166,7 +166,7 @@ inline bool PresetIterator::operator ==(const PresetIterator & presetPos) const return (*presetPos == **this); } -inline Preset * PresetIterator::allocate(const PresetInputs & presetInputs, PresetOutputs & presetOutputs) { +inline std::auto_ptr PresetIterator::allocate(const PresetInputs & presetInputs, PresetOutputs & presetOutputs) { return m_presetChooser->directoryIndex(m_currentIndex, presetInputs, presetOutputs); } @@ -188,26 +188,26 @@ inline PresetIterator PresetChooser::end() const { } template -Preset * PresetChooser::weightedRandom(const PresetInputs & presetInputs, PresetOutputs & presetOutputs, WeightFunctor & weightFunctor) { +std::auto_ptr PresetChooser::weightedRandom(const PresetInputs & presetInputs, PresetOutputs & presetOutputs, WeightFunctor & weightFunctor) { doWeightedSample(weightFunctor); } template -inline Preset * PresetChooser::weightedRandom(const PresetInputs & presetInputs, PresetOutputs & presetOutputs){ +inline std::auto_ptr PresetChooser::weightedRandom(const PresetInputs & presetInputs, PresetOutputs & presetOutputs){ WeightFunctor weightFunctor(m_presetLoader->getNumPresets()); - doWeightedSample(weightFunctor, presetInputs, presetOutputs); + return doWeightedSample(weightFunctor, presetInputs, presetOutputs); } -inline Preset * PresetChooser::directoryIndex(std::size_t index, const PresetInputs & presetInputs, +inline std::auto_ptr PresetChooser::directoryIndex(std::size_t index, const PresetInputs & presetInputs, PresetOutputs & presetOutputs) const { return m_presetLoader->loadPreset(index,presetInputs, presetOutputs); } template -inline Preset * PresetChooser::doWeightedSample(WeightFunctor & weightFunctor, const PresetInputs & presetInputs, PresetOutputs & presetOutputs) { +inline std::auto_ptr PresetChooser::doWeightedSample(WeightFunctor & weightFunctor, const PresetInputs & presetInputs, PresetOutputs & presetOutputs) { // Choose a random bounded mass between 0 and 1 float cutoff = ((float)(random())) / RAND_MAX; diff --git a/src/projectM-engine/PresetFrameIO.cpp b/src/projectM-engine/PresetFrameIO.cpp index 721bb879f..742639ad4 100644 --- a/src/projectM-engine/PresetFrameIO.cpp +++ b/src/projectM-engine/PresetFrameIO.cpp @@ -133,7 +133,7 @@ void PresetOutputs::Initialize ( int gx, int gy ) dx_is_mesh = false; dy_is_mesh =false; cx_is_mesh = false; - cy_is_mesh = false;; + cy_is_mesh = false; } diff --git a/src/projectM-engine/PresetLoader.cpp b/src/projectM-engine/PresetLoader.cpp index f5cdef1b4..14423a077 100644 --- a/src/projectM-engine/PresetLoader.cpp +++ b/src/projectM-engine/PresetLoader.cpp @@ -96,7 +96,7 @@ void PresetLoader::rescan() } -Preset * PresetLoader::loadPreset(unsigned int index, const PresetInputs & presetInputs, PresetOutputs & presetOutputs) const +std::auto_ptr PresetLoader::loadPreset(unsigned int index, const PresetInputs & presetInputs, PresetOutputs & presetOutputs) const { // Check that index isn't insane @@ -104,7 +104,7 @@ Preset * PresetLoader::loadPreset(unsigned int index, const PresetInputs & prese assert(index < m_entries.size()); // Return a new pointer to a present - return new Preset(m_entries[index], presetInputs, presetOutputs); + return std::auto_ptr(new Preset(m_entries[index], presetInputs, presetOutputs)); } diff --git a/src/projectM-engine/PresetLoader.hpp b/src/projectM-engine/PresetLoader.hpp index 3b9284847..a23571367 100644 --- a/src/projectM-engine/PresetLoader.hpp +++ b/src/projectM-engine/PresetLoader.hpp @@ -25,7 +25,7 @@ class PresetLoader { /** Load a preset by specifying a filename of the directory (that is, NOT full path) */ /** Autopointers: when you take it, I leave it */ - Preset * loadPreset(unsigned int index, const PresetInputs & presetInputs, + std::auto_ptr loadPreset(unsigned int index, const PresetInputs & presetInputs, PresetOutputs & presetOutputs) const; /** Returns the number of presets in the active directory */ diff --git a/src/projectM-engine/console_interface.cpp b/src/projectM-engine/console_interface.cpp index 8ccc12078..9645baed6 100755 --- a/src/projectM-engine/console_interface.cpp +++ b/src/projectM-engine/console_interface.cpp @@ -162,32 +162,29 @@ void projectM::default_key_handler( projectMEvent event, projectMKeycode keycode ++(*m_presetPos); + // Case: already at last preset, loop to beginning if (((*m_presetPos) == m_presetChooser->end())) { - --(*m_presetPos); - break; + *m_presetPos = m_presetChooser->begin(); } - if (m_activePreset) - delete(m_activePreset); - m_activePreset = m_presetPos->allocate(this->presetInputs, this->presetOutputs ); + m_activePreset = m_presetPos->allocate(this->presetInputs, this->presetOutputs); break; + case PROJECTM_K_r: - if (m_activePreset) - delete(m_activePreset); m_activePreset = m_presetChooser->weightedRandom (this->presetInputs, this->presetOutputs); - assert(m_activePreset); break; case PROJECTM_K_p: if (*m_presetPos != m_presetChooser->begin()) { - --(*m_presetPos); - if (m_activePreset) - delete(m_activePreset); - m_activePreset = m_presetPos->allocate(this->presetInputs, this->presetOutputs ); - - // ...mroe + --(*m_presetPos); + } else { + *m_presetPos = m_presetChooser->end(); + --(*m_presetPos); } + + m_activePreset = m_presetPos->allocate(this->presetInputs, this->presetOutputs); + break; case PROJECTM_K_l: if (renderer->noSwitch==0)renderer->noSwitch=1; else renderer->noSwitch=0; diff --git a/src/projectM-engine/projectM.cpp b/src/projectM-engine/projectM.cpp index e0ce27305..c6f846708 100755 --- a/src/projectM-engine/projectM.cpp +++ b/src/projectM-engine/projectM.cpp @@ -71,7 +71,8 @@ projectM *projectM::currentEngine = NULL; RenderTarget * projectM::renderTarget = NULL; Renderer * projectM::renderer = NULL; -DLLEXPORT projectM::projectM() :beatDetect ( 0 ), m_activePreset ( 0 ) + +DLLEXPORT projectM::projectM() :beatDetect ( 0 ) { } @@ -132,8 +133,6 @@ DLLEXPORT void projectM::renderFrame() { presetInputs.progress=0.0; presetInputs.frame = 0; - if (m_activePreset) - delete(m_activePreset); m_activePreset = m_presetChooser->weightedRandom (presetInputs, presetOutputs); nohard=presetInputs.fps*5; @@ -143,8 +142,6 @@ DLLEXPORT void projectM::renderFrame() { // printf("%f %d %d\n", beatDetect->bass-beatDetect->bass_old,this->frame,this->avgtime); printf("HARD CUT"); - if (m_activePreset) - delete(m_activePreset); m_activePreset = m_presetChooser->weightedRandom (presetInputs, presetOutputs); nohard=presetInputs.fps*5; @@ -749,7 +746,7 @@ int projectM::initPresetTools() // First preset std::cerr << "[projectM] Allocating first preset..." << std::endl; - assert(m_activePreset == 0); + m_activePreset = m_presetPos->allocate ( presetInputs, presetOutputs ); std::cerr << "[projectM] First preset allocated. File path is \"" << m_activePreset->file_path << "\"" << std::endl; diff --git a/src/projectM-engine/projectM.hpp b/src/projectM-engine/projectM.hpp index f4a47f38e..5f42c3253 100755 --- a/src/projectM-engine/projectM.hpp +++ b/src/projectM-engine/projectM.hpp @@ -229,7 +229,7 @@ public: PresetChooser * m_presetChooser; // Currently loaded preset- will be fancier when smooth preset switching - Preset * m_activePreset; + std::auto_ptr m_activePreset; /** All readonly variables * which are passed as inputs