1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-22 22:21:24 +01:00

Some more const, some stl idioms, remove unused declaration

This commit is contained in:
Paul Licameli
2016-09-13 19:17:40 -04:00
parent 740ec8b72b
commit 39d514b183
14 changed files with 44 additions and 42 deletions

View File

@@ -149,22 +149,22 @@ void GetProjectInfoCommand::SendTracksInfo(TrackList *projTracks,
Status(boolValueStr);
}
bool GetProjectInfoCommand::testSelected(Track * track) const
bool GetProjectInfoCommand::testSelected(const Track * track) const
{
return track->GetSelected();
}
bool GetProjectInfoCommand::testLinked(Track * track) const
bool GetProjectInfoCommand::testLinked(const Track * track) const
{
return track->GetLinked();
}
bool GetProjectInfoCommand::testSolo(Track * track) const
bool GetProjectInfoCommand::testSolo(const Track * track) const
{
return track->GetSolo();
}
bool GetProjectInfoCommand::testMute(Track * track) const
bool GetProjectInfoCommand::testMute(const Track * track) const
{
return track->GetMute();
}

View File

@@ -44,16 +44,16 @@ private:
int SendFocusedTrackIndex(CommandExecutionContext context);
// Function pointer to get a particular (Boolean only) Track parameter
typedef bool (GetProjectInfoCommand::*Getter)(Track *track) const;
typedef bool (GetProjectInfoCommand::*Getter)(const Track *track) const;
// Uses the Function pointer to set a particular parameter within a loop of otherwise duplicate code
void SendTracksInfo(TrackList *projTracks, Getter);
// Functions pointed to for getting track parameters
bool testSelected(Track * track) const;
bool testLinked(Track * track) const;
bool testSolo(Track * track) const;
bool testMute(Track * track) const;
bool testSelected(const Track * track) const;
bool testLinked(const Track * track) const;
bool testSolo(const Track * track) const;
bool testMute(const Track * track) const;
};