Mentions légales du service

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

Fix Faust::Vect += operator overridding, it was adding the vector to itself...

Fix Faust::Vect += operator overridding, it was adding the vector to itself instead of adding the two vectors ('this' and operator right hand argument vector) together into 'this'.
parent d0585ef8
Branches
Tags 3.20.0
No related merge requests found
...@@ -184,8 +184,8 @@ void Faust::Vect<FPP,Cpu>::operator+=(const Faust::Vect<FPP,Cpu>& v) ...@@ -184,8 +184,8 @@ void Faust::Vect<FPP,Cpu>::operator+=(const Faust::Vect<FPP,Cpu>& v)
handleError(m_className,"operator+= : dimensions are in conflict"); handleError(m_className,"operator+= : dimensions are in conflict");
} }
FPP*const ptr_data = getData(); FPP* ptr_data = getData();
FPP*const v_ptr_data = getData(); const FPP* v_ptr_data = v.getData();
for (int i=0 ; i<size() ; i++) for (int i=0 ; i<size() ; i++)
ptr_data[i] += v_ptr_data[i]; ptr_data[i] += v_ptr_data[i];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment