mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-16 15:57:52 +01:00
void return, not boolean success, from some Track virtual functions...
... The return codes were mostly ignored anyway, and exceptions will be thrown instead. It seems there was also confusion whether the return values of Track::Paste and Track::SyncLockAdjust were to indicate success or indicate whether there was any change. No matter now.
This commit is contained in:
@@ -300,28 +300,22 @@ bool Track::IsSyncLockSelected() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Track::SyncLockAdjust(double oldT1, double newT1)
|
||||
void Track::SyncLockAdjust(double oldT1, double newT1)
|
||||
{
|
||||
if (newT1 > oldT1) {
|
||||
// Insert space within the track
|
||||
|
||||
if (oldT1 > GetEndTime())
|
||||
return true;
|
||||
return;
|
||||
|
||||
auto tmp = Cut(oldT1, GetEndTime());
|
||||
|
||||
bool ret = Paste(newT1, tmp.get());
|
||||
wxASSERT(ret); // TODO: handle this.
|
||||
|
||||
return ret;
|
||||
Paste(newT1, tmp.get());
|
||||
}
|
||||
else if (newT1 < oldT1) {
|
||||
// Remove from the track
|
||||
return Clear(newT1, oldT1);
|
||||
Clear(newT1, oldT1);
|
||||
}
|
||||
|
||||
// fall-through: no change
|
||||
return true;
|
||||
}
|
||||
|
||||
void PlayableTrack::Init( const PlayableTrack &orig )
|
||||
|
||||
Reference in New Issue
Block a user