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

Method FindById

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

Source from the content-addressed store, hash-verified

518}
519
520Track *TrackList::FindById( TrackId id )
521{
522 // Linear search. Tracks in a project are usually very few.
523 // Search only the non-pending tracks.
524 auto it = std::find_if( ListOfTracks::begin(), ListOfTracks::end(),
525 [=](const ListOfTracks::value_type &ptr){ return ptr->GetId() == id; } );
526 if (it == ListOfTracks::end())
527 return {};
528 return it->get();
529}
530
531Track *TrackList::DoAddToHead(const std::shared_ptr<Track> &t)
532{

Callers 3

UpdatePendingTracksMethod · 0.80
ApplyPendingTracksMethod · 0.80
resetDataSelectionMethod · 0.80

Calls 4

GetIdMethod · 0.80
beginFunction · 0.70
endFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected