Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix index types in testfilter #408

Merged
merged 1 commit into from
Jan 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/library/filter/testfilter/testfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void testFIRFilter(const string &name, const Input& input, const Output& output,
SimpleFilter refFilter(coeffs, one);

// SimpleFilter has a delay, so pre-feed an appropriate number of samples
const int delay = coeffs.size() / 2;
const unsigned delay = coeffs.size() / 2;
for (unsigned i = 0; i < delay; i++) {
const double input_o = (i >= input.size()) ? 0 : input[i];
refFilter.feed(input_o);
Expand Down Expand Up @@ -186,7 +186,7 @@ void testFIRCoeffs(const string &name, const Coeffs &coeffs)
// This tests that making up samples outside the bounds of the input works
// correctly for all combinations of sizes.

for (int i = 0; i < int {coeffs.size() + 3}; i++) {
for (int i = 0; i < static_cast<int>(coeffs.size()) + 3; i++) {
f.apply(input, output);
testFIRFilter(name + " length " + to_string(i) + " separate", input, output, coeffs);

Expand Down