Avoid dynamic-cast, prefer virtual inheritance for performance reasons
This commit is contained in:
parent
522f28b3c5
commit
8006057279
@ -148,6 +148,7 @@ public:
|
|||||||
|
|
||||||
int silent_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
|
int silent_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
|
||||||
|
|
||||||
|
virtual bool declick_in_progress () const { return false; }
|
||||||
virtual bool can_record() { return false; }
|
virtual bool can_record() { return false; }
|
||||||
|
|
||||||
void non_realtime_transport_stop (samplepos_t now, bool flush);
|
void non_realtime_transport_stop (samplepos_t now, bool flush);
|
||||||
|
@ -583,8 +583,7 @@ Session::declick_in_progress () const
|
|||||||
{
|
{
|
||||||
boost::shared_ptr<RouteList> rl = routes.reader();
|
boost::shared_ptr<RouteList> rl = routes.reader();
|
||||||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||||
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
if ((*i)->declick_in_progress ()) {
|
||||||
if (tr && tr->declick_in_progress ()) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user