Skip to content
Snippets Groups Projects
Commit b89b62a6 authored by Alex Buts's avatar Alex Buts
Browse files

Re #13566 GCC pedantic warnings

parent fd407f4e
No related branches found
No related tags found
No related merge requests found
......@@ -582,6 +582,11 @@ double runAverage(size_t index, size_t startIndex, size_t endIndex,
weight1 = (end - binBndrs->operator[](iEnd)) /
(binBndrs->operator[](iEnd + 1) - binBndrs->operator[](iEnd));
}
if (iStart > iEnd) { // start and end get into the same bin
weight1 = 0;
weight0 = (end - start) /
(binBndrs->operator[](iStart)-binBndrs->operator[](iStart - 1));
}
} else { // integer indexes and functions defined in the bin centers
iStart = index - static_cast<size_t>(halfWidth);
if (startIndex + static_cast<size_t>(halfWidth) > index)
......@@ -590,11 +595,6 @@ double runAverage(size_t index, size_t startIndex, size_t endIndex,
if (iEnd > endIndex)
iEnd = endIndex;
}
if (iStart > iEnd) { // start and end get into the same bin
weight1 = 0;
weight0 = (end - start) /
(binBndrs->operator[](iStart)-binBndrs->operator[](iStart - 1));
}
double avrg = 0;
size_t ic = 0;
......@@ -612,7 +612,7 @@ double runAverage(size_t index, size_t startIndex, size_t endIndex,
} else {
return avrg / double(ic);
}
};
}
}
/** Basic running average of input vector within specified range, considering
* variable bin-boundaries if such boundaries are provided.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment