Some cppcheck fixes by David Binderman
This commit is contained in:
parent
7c49019669
commit
68897d8932
|
@ -57,7 +57,7 @@ enum Column
|
|||
class RowData
|
||||
{
|
||||
public:
|
||||
RowData(int index_, const wxString &title_, SelectedRegion selectedRegion_)
|
||||
RowData(int index_, const wxString &title_, const SelectedRegion &selectedRegion_)
|
||||
: index(index_), title(title_), selectedRegion(selectedRegion_)
|
||||
{}
|
||||
|
||||
|
|
|
@ -2542,7 +2542,6 @@ bool LabelTrack::PasteOver(double t, const Track * src)
|
|||
labelStruct.title
|
||||
};
|
||||
mLabels.insert(mLabels.begin() + pos++, l);
|
||||
len++;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1248,7 +1248,7 @@ unsigned TrackList::GetNumExportChannels(bool selectionOnly) const
|
|||
/* counters for tracks panned different places */
|
||||
int numLeft = 0;
|
||||
int numRight = 0;
|
||||
int numMono = 0;
|
||||
//int numMono = 0;
|
||||
/* track iteration kit */
|
||||
const Track *tr;
|
||||
TrackListConstIterator iter;
|
||||
|
@ -1289,7 +1289,7 @@ unsigned TrackList::GetNumExportChannels(bool selectionOnly) const
|
|||
numRight++;
|
||||
}
|
||||
else if (pan == 0) { // panned dead center
|
||||
numMono++;
|
||||
// numMono++;
|
||||
}
|
||||
else { // panned somewhere else
|
||||
numLeft++;
|
||||
|
|
|
@ -2249,7 +2249,7 @@ WaveClip* WaveTrack::GetClipAtTime(double time)
|
|||
// If "time" is the end time of the first of two such clips, and the end time is slightly
|
||||
// less than the start time of the second clip, then the first rather than the
|
||||
// second clip is found by the above code. So correct this.
|
||||
if (p != clips.rend() & p != clips.rbegin() &&
|
||||
if (p != clips.rend() && p != clips.rbegin() &&
|
||||
time == (*p)->GetEndTime() &&
|
||||
(*p)->SharesBoundaryWithNextClip(*(p-1))) {
|
||||
p--;
|
||||
|
|
|
@ -2379,7 +2379,7 @@ void EffectEqualization::ErrMin(void)
|
|||
error += err*err;
|
||||
}
|
||||
}
|
||||
while( (error < oldError) & flag );
|
||||
while( (error < oldError) && flag );
|
||||
if( error > oldError )
|
||||
{
|
||||
mEQVals[i] = mEQValsOld; //last one didn't work
|
||||
|
|
|
@ -345,10 +345,13 @@ static int GuessFloatFormats(unsigned numTests, const ArrayOf<char> rawData[], s
|
|||
|
||||
size_t i = 0;
|
||||
for(; i < len1; i++)
|
||||
// This code is testing for NaNs.
|
||||
// We'd like to know if all data is finite.
|
||||
if (!(data1[i]>=0 || data1[i]<=0) ||
|
||||
!(data2[i]>=0 || data2[i]<=0))
|
||||
break;
|
||||
if (i == len1)
|
||||
// all data is finite.
|
||||
finiteVotes++;
|
||||
|
||||
min = data1[0];
|
||||
|
|
Loading…
Reference in New Issue