1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-07 23:15:36 +01:00

Regularize casts as (int), so they are easier to find and review

This commit is contained in:
Paul Licameli
2016-09-20 08:26:42 -04:00
parent 8e1b084f01
commit f993f1eadf
24 changed files with 105 additions and 105 deletions

View File

@@ -202,7 +202,7 @@ void Envelope::DrawPoints(wxDC & dc, const wxRect & r, const ZoomInfo &zoomInfo,
}
double v = mEnv[i].GetVal();
int x = int(position);
int x = (int)(position);
int y, y2;
y = GetWaveYPos(v, zoomMin, zoomMax, r.height, dB,
@@ -361,7 +361,7 @@ bool Envelope::HandleMouseButtonDown(wxMouseEvent & event, wxRect & r,
const wxInt64 position = zoomInfo.TimeToPosition(time);
if (position >= 0 && position < r.width) {
int x = int (position);
int x = (int)(position);
int y[4];
int numControlPoints;
@@ -1012,7 +1012,7 @@ void Envelope::BinarySearchForTime( int &Lo, int &Hi, double t ) const
// Optimizations for the usual pattern of repeated calls with
// small increases of t.
{
if (mSearchGuess >= 0 && mSearchGuess < int(mEnv.size()) - 1) {
if (mSearchGuess >= 0 && mSearchGuess < (int)(mEnv.size()) - 1) {
if (t >= mEnv[mSearchGuess].GetT() &&
t < mEnv[1 + mSearchGuess].GetT()) {
Lo = mSearchGuess;
@@ -1022,7 +1022,7 @@ void Envelope::BinarySearchForTime( int &Lo, int &Hi, double t ) const
}
++mSearchGuess;
if (mSearchGuess >= 0 && mSearchGuess < int(mEnv.size()) - 1) {
if (mSearchGuess >= 0 && mSearchGuess < (int)(mEnv.size()) - 1) {
if (t >= mEnv[mSearchGuess].GetT() &&
t < mEnv[1 + mSearchGuess].GetT()) {
Lo = mSearchGuess;