Remove dead code.
[ardour.git] / gtk2_ardour / editor_ops.cc
index 53d6de9f5e2d605b4d5824b2b8aac1017905f6fb..f0de126c6735046a66bfa37be53d424fe17dd106 100644 (file)
@@ -1533,7 +1533,7 @@ Editor::temporal_zoom (framecnt_t fpp)
        // would be 4147200000 samples, so 2592000 samples per pixel.
 
        nfpp = min (fpp, (framecnt_t) 2592000);
-       nfpp = max ((framecnt_t) 1, fpp);
+       nfpp = max ((framecnt_t) 1, nfpp);
 
        new_page_size = (framepos_t) floor (_visible_canvas_width * nfpp);
        half_page_size = new_page_size / 2;
@@ -4386,7 +4386,7 @@ Editor::paste_internal (framepos_t position, float times)
                sort_track_selection (ts);
        } else {
                /* Figure out which track to base the paste at. */
-               TimeAxisView* base_track;
+               TimeAxisView* base_track = NULL;
                if (_edit_point == Editing::EditAtMouse && entered_track) {
                        /* With the mouse edit point, paste onto the track under the mouse. */
                        base_track = entered_track;
@@ -4396,6 +4396,9 @@ Editor::paste_internal (framepos_t position, float times)
                } else if (_last_cut_copy_source_track) {
                        /* Paste to the track that the cut/copy came from (see mantis #333). */
                        base_track = _last_cut_copy_source_track;
+               } else {
+                       /* This is "impossible" since we've copied... well, do nothing. */
+                       return;
                }
 
                /* Walk up to parent if necessary, so base track is a route. */
@@ -4846,8 +4849,8 @@ Editor::apply_midi_note_edit_op_to_region (MidiOperator& op, MidiRegionView& mrv
        vector<Evoral::Sequence<Evoral::MusicalTime>::Notes> v;
        v.push_back (selected);
 
-       framepos_t pos_frames = mrv.midi_region()->position() - mrv.midi_region()->start();
-       double     pos_beats  = _session->tempo_map().framewalk_to_beats(0, pos_frames);
+       framepos_t          pos_frames = mrv.midi_region()->position() - mrv.midi_region()->start();
+       Evoral::MusicalTime pos_beats  = _session->tempo_map().framewalk_to_beats(0, pos_frames);
 
        return op (mrv.midi_region()->model(), pos_beats, v);
 }
@@ -4960,7 +4963,7 @@ Editor::quantize_region ()
        qd->hide ();
 
        if (r == Gtk::RESPONSE_OK) {
-               Quantize quant (*_session, qd->snap_start(), qd->snap_end(),
+               Quantize quant (qd->snap_start(), qd->snap_end(),
                                qd->start_grid_size(), qd->end_grid_size(),
                                qd->strength(), qd->swing(), qd->threshold());
 
@@ -4985,7 +4988,7 @@ Editor::insert_patch_change (bool from_context)
        */
        MidiRegionView* first = dynamic_cast<MidiRegionView*> (rs.front ());
 
-       Evoral::PatchChange<Evoral::MusicalTime> empty (0, 0, 0, 0);
+       Evoral::PatchChange<Evoral::MusicalTime> empty (Evoral::MusicalTime(), 0, 0, 0);
         PatchChangeDialog d (0, _session, empty, first->instrument_info(), Gtk::Stock::ADD);
 
        if (d.run() == RESPONSE_CANCEL) {