Fix a few warnings
authorBen Loftis <ben@harrisonconsoles.com>
Thu, 15 Feb 2018 22:06:19 +0000 (16:06 -0600)
committerBen Loftis <ben@harrisonconsoles.com>
Sat, 17 Feb 2018 15:12:38 +0000 (09:12 -0600)
gtk2_ardour/editor.cc
gtk2_ardour/editor_mouse.cc
gtk2_ardour/editor_selection.cc
gtk2_ardour/editor_summary.h
gtk2_ardour/midi_region_view.cc
gtk2_ardour/processor_box.h

index f5404f45e9ee6ffe0456eb796fefb0e3ca6c7fb4..2806d261e9128c19c87da9e51bd489871d329ab6 100644 (file)
@@ -2719,7 +2719,7 @@ Editor::snap_to_grid (vector<ArdourCanvas::Ruler::Mark> marks, samplepos_t presn
 
        samplepos_t before;
        samplepos_t after;
-       samplepos_t test;
+       samplepos_t test = presnap;
 
        before = after = max_samplepos;
 
@@ -2742,7 +2742,7 @@ Editor::snap_to_grid (vector<ArdourCanvas::Ruler::Mark> marks, samplepos_t presn
        }
 
        if (before == max_samplepos && after == max_samplepos) {
-               /* No smpte to snap to, so just don't snap */
+               /* No grid to snap to, so just don't snap */
                return presnap;
        } else if (before == max_samplepos) {
                test = after;
index 1a90513f72a3a64629b3ce7f88d4a72a7188ccb0..6b24acd9384db9f2858045b3b1280953d103639e 100644 (file)
@@ -2237,7 +2237,6 @@ Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
 
        if (Keyboard::modifier_state_contains (event->state, Keyboard::PrimaryModifier)) {
                TimeAxisView* tv = &rv.get_time_axis_view();
-               RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(tv);
 
                samplepos_t where = get_preferred_edit_position();
 
index 02f44a93fc1857ac85d2b73f9bf455e63ef1e1be..95cba60704ed00e6a8859b4ef2f1d2cf8874947b 100644 (file)
@@ -1816,7 +1816,7 @@ Editor::set_selection_from_region ()
 
        selection->set (tvl);
 
-       if (!get_smart_mode () || !mouse_mode == Editing::MouseObject) {
+       if (!get_smart_mode () || !(mouse_mode == Editing::MouseObject) ) {
                set_mouse_mode (Editing::MouseRange, false);
        }
 }
index d875c7a38234f97e54332b8f21ad1db58da3a2bc..507295cfffbad03198b0ceccf5d8905bc2700824 100644 (file)
@@ -93,9 +93,6 @@ private:
        samplepos_t _leftmost; ///< the earliest sample we ever viewed
        samplepos_t _rightmost; ///< the latest sample we ever viewed
 
-       /** fraction of the session length by which the overview size should extend past the start and end markers */
-       double _overhang_fraction;
-
        double _x_scale; ///< pixels per sample for the x axis of the pixmap
        double _track_height;
        double _last_playhead;
index c83e1b87ad3bbdc148f09be11521473f572c36e2..481ac039b64982f09b64b65818c23068f26dd8ac 100644 (file)
@@ -1054,14 +1054,15 @@ MidiRegionView::note_diff_add_change (NoteBase* ev,
 void
 MidiRegionView::apply_diff (bool as_subcommand, bool was_copy)
 {
-       bool add_or_remove;
        bool commit = false;
 
        if (!_note_diff_command) {
                return;
        }
 
-       if (!was_copy && (add_or_remove = _note_diff_command->adds_or_removes())) {
+       bool add_or_remove = _note_diff_command->adds_or_removes();
+
+       if (!was_copy && add_or_remove) {
                // Mark all selected notes for selection when model reloads
                for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
                        _marked_for_selection.insert((*i)->note());
index 410e5b91d7440e813d1470cb39b41bae3fac506e..5772e6dbd142de0612344691094993e92929d479 100644 (file)
@@ -120,7 +120,6 @@ class PluginPinWindowProxy : public WM::ProxyBase
        ARDOUR::SessionHandlePtr* session_handle();
 
   private:
-       ProcessorBox* _processor_box;
        boost::weak_ptr<ARDOUR::Processor> _processor;
 
        void processor_going_away ();