Skip to content

Commit

Permalink
Merge only 0 or 1 zero-crossings
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Jul 14, 2016
1 parent a25dc00 commit 68b6340
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Compiler/BackEnd/FindZeroCrossings.mo
Expand Up @@ -1471,14 +1471,8 @@ algorithm
elseif matches == 1 then
DoubleEndedList.mapNoCopy_1(zcs, mergeZeroCrossingIfEqual, newZc);
else
// Multiple matches, for some reason
diff := DoubleEndedList.toListAndClear(zcs);
while not listEmpty(diff) loop
zc1::diff := diff;
(samezc, diff) := List.split1OnTrue(diff, zcEqual, zc1);
same_1 := List.fold(samezc, mergeZeroCrossing, zc1);
DoubleEndedList.push_front(zcs, same_1);
end while;
Error.addInternalError("mergeZeroCrossings got matches="+String(matches)+" (should be 0 or 1)", sourceInfo());
fail();
end if;
end mergeZeroCrossings;

Expand Down

0 comments on commit 68b6340

Please sign in to comment.