1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-16 09:31:14 +01:00

Use std::vector for wave track locations

This commit is contained in:
Paul Licameli
2016-02-19 19:09:36 -05:00
parent 60eeac0b10
commit 05f5375e4a
5 changed files with 34 additions and 43 deletions

View File

@@ -375,9 +375,8 @@ class AUDACITY_DLL_API WaveTrack final : public Track {
// Cache special locations (e.g. cut lines) for later speedy access
void UpdateLocationsCache();
// Get number of cached locations
int GetNumCachedLocations() { return mDisplayNumLocations; }
Location GetCachedLocation(int index) { return mDisplayLocations[index]; }
// Get cached locations
const std::vector<Location> &GetCachedLocations() const { return mDisplayLocationsCache; }
// Expand cut line (that is, re-insert audio, then DELETE audio saved in cut line)
bool ExpandCutLine(double cutLinePosition, double* cutlineStart = NULL, double* cutlineEnd = NULL);
@@ -477,9 +476,7 @@ class AUDACITY_DLL_API WaveTrack final : public Track {
WaveTrackDisplay mDisplay;
int mLastScaleType; // last scale type choice
int mLastdBRange;
int mDisplayNumLocations;
int mDisplayNumLocationsAllocated;
Location* mDisplayLocations;
mutable std::vector <Location> mDisplayLocationsCache;
//
// Protected methods