MCPcopy Create free account
hub / github.com/audacity/audacity / Insert

Method Insert

libraries/lib-track/Track.cpp:481–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481void TrackList::Insert(const Track* before,
482 const Track::Holder &pSrc, bool assignIds)
483{
484 assert(before == nullptr || Find(before) != EndIterator<const Track>());
485
486 if(before == nullptr)
487 {
488 Add(pSrc, assignIds);
489 return;
490 }
491
492 std::vector<Track *> arr;
493 arr.reserve(Size() + 1);
494 for (const auto track : *this) {
495 if (track == before)
496 arr.push_back(pSrc.get());
497 arr.push_back(track);
498 }
499 Add(pSrc, assignIds);
500 Permute(arr);
501}
502
503void TrackList::Permute(const std::vector<Track *> &tracks)
504{

Callers 6

SplitChannelsMethod · 0.45
RebuildJoinedEnvelopeFunction · 0.45
setCurveMethod · 0.45
CreateStdButtonSizerFunction · 0.45
ApplyPendingTracksMethod · 0.45

Calls 5

FindFunction · 0.85
AddFunction · 0.85
SizeFunction · 0.70
push_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected