mirror of
				https://github.com/cookiengineer/audacity
				synced 2025-11-04 08:04:06 +01:00 
			
		
		
		
	Fix a compilation warning, make some member functions const
This commit is contained in:
		
				
					committed by
					
						
						Paul Licameli
					
				
			
			
				
	
			
			
			
						parent
						
							6810095509
						
					
				
				
					commit
					1992b0c7e3
				
			@@ -218,7 +218,7 @@ void NoteTrack::WarpAndTransposeNotes(double t0, double t1,
 | 
			
		||||
   Alg_iterator iter(mSeq, false);
 | 
			
		||||
   iter.begin();
 | 
			
		||||
   Alg_event_ptr event;
 | 
			
		||||
   while ((event = iter.next()) && event->time < t1) {
 | 
			
		||||
   while (0 != (event = iter.next()) && event->time < t1) {
 | 
			
		||||
      if (event->is_note() && event->time >= t0 &&
 | 
			
		||||
          // Allegro data structure does not restrict channels to 16.
 | 
			
		||||
          // Since there is not way to select more than 16 channels,
 | 
			
		||||
 
 | 
			
		||||
@@ -270,7 +270,7 @@ void Track::ReorderList(bool resize)
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
bool Track::IsSyncLockSelected()
 | 
			
		||||
bool Track::IsSyncLockSelected() const
 | 
			
		||||
{
 | 
			
		||||
#ifdef EXPERIMENTAL_SYNC_LOCK
 | 
			
		||||
   AudacityProject *p = GetActiveProject();
 | 
			
		||||
@@ -278,7 +278,7 @@ bool Track::IsSyncLockSelected()
 | 
			
		||||
      return false;
 | 
			
		||||
 | 
			
		||||
   SyncLockedTracksIterator git(mList);
 | 
			
		||||
   Track *t = git.First(this);
 | 
			
		||||
   Track *t = git.First(const_cast<Track*>(this));
 | 
			
		||||
 | 
			
		||||
   if (!t) {
 | 
			
		||||
      // Not in a sync-locked group.
 | 
			
		||||
 
 | 
			
		||||
@@ -206,7 +206,7 @@ class AUDACITY_DLL_API Track: public XMLTagHandler
 | 
			
		||||
   virtual double GetEndTime() const = 0;
 | 
			
		||||
 | 
			
		||||
   // Checks if sync-lock is on and any track in its sync-lock group is selected.
 | 
			
		||||
   bool IsSyncLockSelected();
 | 
			
		||||
   bool IsSyncLockSelected() const;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct TrackListNode
 | 
			
		||||
 
 | 
			
		||||
@@ -1631,7 +1631,7 @@ AUDACITY_DLL_API sampleCount WaveTrack::TimeToLongSamples(double t0) const
 | 
			
		||||
   return (sampleCount)floor(t0 * mRate + 0.5);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
double WaveTrack::LongSamplesToTime(sampleCount pos)
 | 
			
		||||
double WaveTrack::LongSamplesToTime(sampleCount pos) const
 | 
			
		||||
{
 | 
			
		||||
   return ((double)pos) / mRate;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -303,7 +303,7 @@ class AUDACITY_DLL_API WaveTrack: public Track {
 | 
			
		||||
    * @param pos The time number of samples from the start of the track to convert.
 | 
			
		||||
    * @return The time in seconds.
 | 
			
		||||
    */
 | 
			
		||||
   double LongSamplesToTime(sampleCount pos);
 | 
			
		||||
   double LongSamplesToTime(sampleCount pos) const;
 | 
			
		||||
 | 
			
		||||
   // Get access to the clips in the tracks. This is used by
 | 
			
		||||
   // track artists and also by TrackPanel when sliding...it would
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user