Fix timing segment scaling.

When in doubt, use the direct approach.
This commit is contained in:
Jason Felds
2011-07-26 11:35:58 -04:00
parent ff526c5eb0
commit 5c34929600
+2 -4
View File
@@ -1011,13 +1011,11 @@ void TimingData::ScaleRegion( float fScale, int iStartIndex, int iEndIndex, bool
int length = iEndIndex - iStartIndex;
int newLength = lrintf( fScale * length );
// TODO: Confirm this works as intended.
for (unsigned i = 0; i < NUM_TimingSegmentType; i++)
{
vector<TimingSegment *> &segs = this->allTimingSegments[i];
for (unsigned j = 0; j < segs.size(); j++)
for (unsigned j = 0; j < this->allTimingSegments[i].size(); j++)
{
segs[i][j].Scale(iStartIndex, length, newLength);
this->allTimingSegments[i][j]->Scale(iStartIndex, length, newLength);
}
}