1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 17:10:05 +02:00

More removal of redundant variables (xLast).

This commit is contained in:
james.k.crook@gmail.com 2012-02-09 13:21:47 +00:00
parent ee6b9b855d
commit de02dc01c8

View File

@ -775,14 +775,12 @@ void FreqWindow::PlotPaint(wxPaintEvent & evt)
int width = r.width - 2; int width = r.width - 2;
float xMin, xMax, xPos, xRatio, xLast, xStep; float xMin, xMax, xRatio, xStep;
if (alg == 0) { if (alg == 0) {
xMin = mRate / mWindowSize; xMin = mRate / mWindowSize;
xMax = mRate / 2; xMax = mRate / 2;
xRatio = xMax / xMin; xRatio = xMax / xMin;
xPos = xMin;
xLast = xPos / 2.0; // ANSWER-ME: Vigilant Sentry notes this var is unused after this assignment. Delete it and the var decl?
if (mLogAxis) if (mLogAxis)
xStep = pow(2.0f, (log(xRatio) / log(2.0f)) / width); xStep = pow(2.0f, (log(xRatio) / log(2.0f)) / width);
else else
@ -790,13 +788,12 @@ void FreqWindow::PlotPaint(wxPaintEvent & evt)
} else { } else {
xMin = 0; xMin = 0;
xMax = mProcessedSize / mRate; xMax = mProcessedSize / mRate;
xPos = xMin;
xLast = xPos / 2.0; // ANSWER-ME: Vigilant Sentry notes this var is unused after this assignment. Delete it and the var decl?
xStep = (xMax - xMin) / width; xStep = (xMax - xMin) / width;
} }
// Find the peak nearest the cursor and plot it float xPos = xMin;
// Find the peak nearest the cursor and plot it
float bestpeak = float(0.0); float bestpeak = float(0.0);
if ( r.Contains(mMouseX, mMouseY) & (mMouseX!=0) & (mMouseX!=r.width-1) ) { if ( r.Contains(mMouseX, mMouseY) & (mMouseX!=0) & (mMouseX!=r.width-1) ) {
if (mLogAxis) if (mLogAxis)