Mentions légales du service

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

Fix bug in Faust::Transform<FPP,Cpu>::updateNonZeros().

If the function were called several times in a row the value would have been as many times too bigger. Use rather the temporary variable (previously not used, just declared) to calculate the non-zeros count and then override the totalNonZeros attribute. This bug is minor because normally we don't have to call it several times if a Transform is immutable.
parent 63bb1f16
No related branches found
No related tags found
No related merge requests found
Pipeline #833838 skipped
......@@ -325,7 +325,8 @@ void Faust::Transform<FPP,Cpu>::updateNonZeros()
{
int totalNonZeros_tmp=0;
for (int i=0;i<size();i++)
totalNonZeros+=data[i].getNonZeros();
totalNonZeros_tmp+=data[i].getNonZeros();
totalNonZeros = totalNonZeros_tmp;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment