1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-16 16:20:50 +02:00

More const qualifications. The source of a paste is const.

This commit is contained in:
Paul Licameli 2016-02-27 12:54:57 -05:00
parent 70c1d57591
commit d097c7fad4
7 changed files with 9 additions and 9 deletions

View File

@ -2471,7 +2471,7 @@ bool LabelTrack::Copy(double t0, double t1, Track ** dest)
}
bool LabelTrack::PasteOver(double t, Track * src)
bool LabelTrack::PasteOver(double t, const Track * src)
{
if (src->GetKind() != Track::Label)
return false;
@ -2497,7 +2497,7 @@ bool LabelTrack::PasteOver(double t, Track * src)
return true;
}
bool LabelTrack::Paste(double t, Track *src)
bool LabelTrack::Paste(double t, const Track *src)
{
if (src->GetKind() != Track::Label)
return false;

View File

@ -159,7 +159,7 @@ class AUDACITY_DLL_API LabelTrack final : public Track
// one in Track.
bool Copy (double t0, double t1, Track ** dest) override;// const;
bool Clear(double t0, double t1) override;
bool Paste(double t, Track * src) override;
bool Paste(double t, const Track * src) override;
bool Repeat(double t0, double t1, int n);
bool Silence(double t0, double t1) override;
@ -220,7 +220,7 @@ class AUDACITY_DLL_API LabelTrack final : public Track
void MayMoveLabel( int iLabel, int iEdge, double fNewTime);
// This pastes labels without shifting existing ones
bool PasteOver(double t, Track *src);
bool PasteOver(double t, const Track *src);
// PRL: These functions were not used because they were not overrides! Was that right?
//bool SplitCut(double b, double e, Track **dest) /* not override */;

View File

@ -520,7 +520,7 @@ bool NoteTrack::Clear(double t0, double t1)
return true;
}
bool NoteTrack::Paste(double t, Track *src)
bool NoteTrack::Paste(double t, const Track *src)
{
// Paste inserts src at time t. If src has a positive offset,
// the offset is treated as silence which is also inserted. If

View File

@ -93,7 +93,7 @@ class AUDACITY_DLL_API NoteTrack final : public Track {
bool Copy (double t0, double t1, Track **dest) override;
bool Trim (double t0, double t1) /* not override */;
bool Clear(double t0, double t1) override;
bool Paste(double t, Track *src) override;
bool Paste(double t, const Track *src) override;
bool Shift(double t) /* not override */;
#ifdef EXPERIMENTAL_MIDI_OUT

View File

@ -183,7 +183,7 @@ class AUDACITY_DLL_API Track /* not final */ : public XMLTagHandler
virtual bool Cut (double WXUNUSED(t0), double WXUNUSED(t1), Track ** WXUNUSED(dest)) {return false;}
virtual bool Copy (double WXUNUSED(t0), double WXUNUSED(t1), Track ** WXUNUSED(dest)) {return false;}
virtual bool Clear(double WXUNUSED(t0), double WXUNUSED(t1)) {return false;}
virtual bool Paste(double WXUNUSED(t), Track * WXUNUSED(src)) {return false;}
virtual bool Paste(double WXUNUSED(t), const Track * WXUNUSED(src)) {return false;}
// This can be used to adjust a sync-lock selected track when the selection
// is replaced by one of a different length.

View File

@ -1181,7 +1181,7 @@ bool WaveTrack::SyncLockAdjust(double oldT1, double newT1)
return true;
}
bool WaveTrack::Paste(double t0, Track *src)
bool WaveTrack::Paste(double t0, const Track *src)
{
bool editClipCanMove = true;
gPrefs->Read(wxT("/GUI/EditClipCanMove"), &editClipCanMove);

View File

@ -156,7 +156,7 @@ class AUDACITY_DLL_API WaveTrack final : public Track {
bool Cut(double t0, double t1, Track **dest) override;
bool Copy(double t0, double t1, Track **dest) override;
bool Clear(double t0, double t1) override;
bool Paste(double t0, Track *src) override;
bool Paste(double t0, const Track *src) override;
bool ClearAndPaste(double t0, double t1,
Track *src,
bool preserve = true,