summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_timefx.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-07-09 13:39:45 +0000
committerCarl Hetherington <carl@carlh.net>2009-07-09 13:39:45 +0000
commit4297071b3f7360b17d81ef9cf36b8d75d46d2818 (patch)
tree13cbb169cfcf79a2e845d8860f0f98e192f3a8d3 /gtk2_ardour/editor_timefx.cc
parent0f8031da06e131595b3625169f9687c1a1ab2f3a (diff)
Use shared_ptr for the TimeAxisView hierarchy.
git-svn-id: svn://localhost/ardour2/branches/3.0@5339 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_timefx.cc')
-rw-r--r--gtk2_ardour/editor_timefx.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc
index 4339962a87..b5e68c1fd2 100644
--- a/gtk2_ardour/editor_timefx.cc
+++ b/gtk2_ardour/editor_timefx.cc
@@ -70,9 +70,10 @@ Editor::time_stretch (RegionSelection& regions, float fraction)
return time_fx (regions, fraction, false);
} else {
// MIDI, just stretch
- RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (&regions.front()->get_time_axis_view());
- if (!rtv)
+ RouteTimeAxisViewPtr rtv = boost::dynamic_pointer_cast<RouteTimeAxisView> (regions.front()->get_time_axis_view());
+ if (!rtv) {
return -1;
+ }
boost::shared_ptr<Playlist> playlist
= rtv->track()->diskstream()->playlist();
@@ -262,14 +263,14 @@ Editor::do_timefx (TimeFXDialog& dialog)
}
boost::shared_ptr<AudioRegion> region (arv->audio_region());
- TimeAxisView* tv = &(arv->get_time_axis_view());
- RouteTimeAxisView* rtv;
+ TimeAxisViewPtr tv = arv->get_time_axis_view();
+ RouteTimeAxisViewPtr rtv;
RegionSelection::iterator tmp;
tmp = i;
++tmp;
- if ((rtv = dynamic_cast<RouteTimeAxisView*> (tv)) == 0) {
+ if ((rtv = boost::dynamic_pointer_cast<RouteTimeAxisView> (tv)) == 0) {
i = tmp;
continue;
}