1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 14:02:57 +02:00

use std::vector to hold TrackClip; move ctor and dtor out of line

This commit is contained in:
Paul Licameli
2016-02-20 13:22:12 -05:00
committed by Paul Licameli
parent c373f4d859
commit cb7872f980
3 changed files with 31 additions and 20 deletions

View File

@@ -21,13 +21,23 @@
#include <wx/arrimpl.cpp>
WX_DEFINE_USER_EXPORTED_OBJARRAY(TrackClipArray);
inline bool operator < (SnapPoint s1, SnapPoint s2)
{
return s1.t < s2.t;
}
TrackClip::TrackClip(Track *t, WaveClip *c)
{
track = origTrack = t;
dstTrack = NULL;
clip = c;
}
TrackClip::~TrackClip()
{
}
SnapManager::SnapManager(TrackList *tracks,
const ZoomInfo *zoomInfo,
const TrackClipArray *clipExclusions,
@@ -126,10 +136,10 @@ void SnapManager::Reinit()
if (mClipExclusions)
{
bool skip = false;
for (size_t j = 0, cnt = mClipExclusions->GetCount(); j < cnt; ++j)
for (size_t j = 0, cnt = mClipExclusions->size(); j < cnt; ++j)
{
if (mClipExclusions->Item(j).track == waveTrack &&
mClipExclusions->Item(j).clip == clip)
if ((*mClipExclusions)[j].track == waveTrack &&
(*mClipExclusions)[j].clip == clip)
{
skip = true;
break;