Use std::min in Sample::visualize

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
This commit is contained in:
saker
2023-09-26 07:49:24 -04:00
committed by GitHub
parent ee19205d77
commit 42086bb691

View File

@@ -185,7 +185,7 @@ void Sample::visualize(QPainter& p, const QRect& dr, int fromFrame, int toFrame)
// the width, so we will have width points, or nbFrames is
// smaller than the width (fpp = 1) and we will have nbFrames
// points
const int totalPoints = nbFrames > w ? w : nbFrames;
const int totalPoints = std::min(nbFrames, w);
std::vector<QPointF> fEdgeMax(totalPoints);
std::vector<QPointF> fEdgeMin(totalPoints);
std::vector<QPointF> fRmsMax(totalPoints);