Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 14930262 authored by hhakim's avatar hhakim
Browse files

Minor change (simplification): replacing Faust::Transform::delete callback def...

Minor change (simplification): replacing Faust::Transform::delete callback def by a lambda expression passed directly to the RefManager.
parent 136e98a0
No related branches found
No related tags found
No related merge requests found
...@@ -243,14 +243,6 @@ namespace Faust ...@@ -243,14 +243,6 @@ namespace Faust
double normFro() const; double normFro() const;
double normFro(const char opThis, const bool isConj) const; double normFro(const char opThis, const bool isConj) const;
static void delete_fact(void * fact)
{
#ifdef DEBUG
std::cout << "Faust::Transform delete_fact" << std::endl;
#endif
delete static_cast<MatGeneric<FPP,Cpu>*>(fact);
}
~Transform(){ ~Transform(){
#ifdef FAUST_VERBOSE #ifdef FAUST_VERBOSE
std::cout << "~Transform()" << std::endl; std::cout << "~Transform()" << std::endl;
......
...@@ -355,7 +355,14 @@ void Faust::Transform<FPP,Cpu>::update_total_nnz() ...@@ -355,7 +355,14 @@ void Faust::Transform<FPP,Cpu>::update_total_nnz()
template<typename FPP> template<typename FPP>
Faust::RefManager Faust::Transform<FPP,Cpu>::ref_man(Faust::Transform<FPP,Cpu>::delete_fact); //Faust::RefManager Faust::Transform<FPP,Cpu>::ref_man(Faust::Transform<FPP,Cpu>::delete_fact);
Faust::RefManager Faust::Transform<FPP,Cpu>::ref_man([](void *fact)
{
#ifdef DEBUG
std::cout << "Faust::Transform delete_fact" << std::endl;
#endif
delete static_cast<MatGeneric<FPP,Cpu>*>(fact);
});
template<typename FPP> template<typename FPP>
void Faust::Transform<FPP,Cpu>::print_file(const char* filename) const void Faust::Transform<FPP,Cpu>::print_file(const char* filename) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment