Prefer const reference (amend f564c92493)

This commit is contained in:
Robin Gareus 2020-07-26 17:15:15 +02:00
parent aca062505b
commit b49656213d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
8 changed files with 22 additions and 16 deletions

View File

@ -44,10 +44,10 @@ class LIBARDOUR_API AudioTrack : public Track
void unfreeze ();
bool bounceable (boost::shared_ptr<Processor>, bool include_endpoint) const;
boost::shared_ptr<Region> bounce (InterThreadInfo&, const std::string name);
boost::shared_ptr<Region> bounce (InterThreadInfo&, std::string const& name);
boost::shared_ptr<Region> bounce_range (samplepos_t start, samplepos_t end, InterThreadInfo&,
boost::shared_ptr<Processor> endpoint, bool include_endpoint,
const std::string name);
boost::shared_ptr<Processor> endpoint, bool include_endpoint,
std::string const& name);
int export_stuff (BufferSet& bufs, samplepos_t start_sample, samplecnt_t nframes,
boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze,
MidiStateTracker&);

View File

@ -79,11 +79,11 @@ public:
void freeze_me (InterThreadInfo&) {}
void unfreeze () {}
boost::shared_ptr<Region> bounce (InterThreadInfo&, const std::string name) {
boost::shared_ptr<Region> bounce (InterThreadInfo&, std::string const& name) {
return boost::shared_ptr<Region> ();
}
boost::shared_ptr<Region> bounce_range (samplepos_t, samplepos_t, InterThreadInfo&, boost::shared_ptr<Processor>, bool, const std::string) {
boost::shared_ptr<Region> bounce_range (samplepos_t, samplepos_t, InterThreadInfo&, boost::shared_ptr<Processor>, bool, std::string const&) {
return boost::shared_ptr<Region> ();
}

View File

@ -53,13 +53,13 @@ public:
void unfreeze ();
bool bounceable (boost::shared_ptr<Processor>, bool) const { return false; }
boost::shared_ptr<Region> bounce (InterThreadInfo&, const std::string name);
boost::shared_ptr<Region> bounce (InterThreadInfo&, std::string const&);
boost::shared_ptr<Region> bounce_range (samplepos_t start,
samplepos_t end,
InterThreadInfo& iti,
boost::shared_ptr<Processor> endpoint,
bool include_endpoint,
const std::string name);
std::string const& name);
int export_stuff (BufferSet& bufs,
samplepos_t start_sample,

View File

@ -913,7 +913,7 @@ public:
boost::shared_ptr<Region> write_one_track (Track&, samplepos_t start, samplepos_t end,
bool overwrite, std::vector<boost::shared_ptr<Source> >&, InterThreadInfo& wot,
boost::shared_ptr<Processor> endpoint,
bool include_endpoint, bool for_export, bool for_freeze, const std::string name);
bool include_endpoint, bool for_export, bool for_freeze, std::string const& name);
int freeze_all (InterThreadInfo&);
/* session-wide solo/mute/rec-enable */

View File

@ -96,7 +96,7 @@ public:
* @param itt asynchronous progress report and cancel
* @return a new audio region (or nil in case of error)
*/
virtual boost::shared_ptr<Region> bounce (InterThreadInfo& itt, const std::string name) = 0;
virtual boost::shared_ptr<Region> bounce (InterThreadInfo& itt, std::string const& name) = 0;
/** Bounce the given range to a new audio region.
* @param start start time (in samples)
@ -107,7 +107,9 @@ public:
* @return a new audio region (or nil in case of error)
*/
virtual boost::shared_ptr<Region> bounce_range (samplepos_t start, samplepos_t end, InterThreadInfo& itt,
boost::shared_ptr<Processor> endpoint, bool include_endpoint, const std::string name) = 0;
boost::shared_ptr<Processor> endpoint, bool include_endpoint,
std::string const& name) = 0;
virtual int export_stuff (BufferSet& bufs, samplepos_t start_sample, samplecnt_t nframes,
boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze,
MidiStateTracker&) = 0;

View File

@ -292,14 +292,18 @@ AudioTrack::bounceable (boost::shared_ptr<Processor> endpoint, bool include_endp
}
boost::shared_ptr<Region>
AudioTrack::bounce (InterThreadInfo& itt, const std::string name)
AudioTrack::bounce (InterThreadInfo& itt, std::string const& name)
{
return bounce_range (_session.current_start_sample(), _session.current_end_sample(), itt, main_outs(), false, name);
}
boost::shared_ptr<Region>
AudioTrack::bounce_range (samplepos_t start, samplepos_t end, InterThreadInfo& itt,
boost::shared_ptr<Processor> endpoint, bool include_endpoint, const std::string name)
AudioTrack::bounce_range (samplepos_t start,
samplepos_t end,
InterThreadInfo& itt,
boost::shared_ptr<Processor> endpoint,
bool include_endpoint,
std::string const& name)
{
vector<boost::shared_ptr<Source> > srcs;
return _session.write_one_track (*this, start, end, false, srcs, itt, endpoint, include_endpoint, false, false, name);

View File

@ -539,7 +539,7 @@ MidiTrack::export_stuff (BufferSet& buffers,
}
boost::shared_ptr<Region>
MidiTrack::bounce (InterThreadInfo& itt, const std::string name)
MidiTrack::bounce (InterThreadInfo& itt, std::string const& name)
{
return bounce_range (_session.current_start_sample(), _session.current_end_sample(), itt, main_outs(), false, name);
}
@ -550,7 +550,7 @@ MidiTrack::bounce_range (samplepos_t start,
InterThreadInfo& itt,
boost::shared_ptr<Processor> endpoint,
bool include_endpoint,
const std::string name)
std::string const& name)
{
vector<boost::shared_ptr<Source> > srcs;
return _session.write_one_track (*this, start, end, false, srcs, itt, endpoint, include_endpoint, false, false, name);

View File

@ -5673,7 +5673,7 @@ Session::write_one_track (Track& track, samplepos_t start, samplepos_t end,
bool /*overwrite*/, vector<boost::shared_ptr<Source> >& srcs,
InterThreadInfo& itt,
boost::shared_ptr<Processor> endpoint, bool include_endpoint,
bool for_export, bool for_freeze, const std::string name)
bool for_export, bool for_freeze, std::string const& name)
{
boost::shared_ptr<Region> result;
boost::shared_ptr<Playlist> playlist;