remove reference "const int32_t&" -> const int32_t"
authorRobin Gareus <robin@gareus.org>
Sun, 10 Jul 2016 13:30:41 +0000 (15:30 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 10 Jul 2016 13:30:41 +0000 (15:30 +0200)
this simplifies lua-bindings and also let's the compiler worry about
constant primitive types.

30 files changed:
gtk2_ardour/automation_time_axis.cc
gtk2_ardour/automation_time_axis.h
gtk2_ardour/editor.h
gtk2_ardour/editor_drag.cc
gtk2_ardour/editor_drag.h
gtk2_ardour/editor_ops.cc
gtk2_ardour/midi_region_view.cc
gtk2_ardour/midi_region_view.h
gtk2_ardour/midi_streamview.cc
gtk2_ardour/midi_streamview.h
gtk2_ardour/midi_time_axis.cc
gtk2_ardour/midi_time_axis.h
gtk2_ardour/public_editor.h
gtk2_ardour/region_view.cc
gtk2_ardour/region_view.h
gtk2_ardour/route_time_axis.cc
gtk2_ardour/route_time_axis.h
gtk2_ardour/time_axis_view.h
libs/ardour/ardour/audioregion.h
libs/ardour/ardour/midi_region.h
libs/ardour/ardour/playlist.h
libs/ardour/ardour/region.h
libs/ardour/ardour/region_factory.h
libs/ardour/ardour/tempo.h
libs/ardour/audioregion.cc
libs/ardour/midi_region.cc
libs/ardour/playlist.cc
libs/ardour/region.cc
libs/ardour/region_factory.cc
libs/ardour/tempo.cc

index 7a8e8ac5b32d346e1ccb810603bdb3426bb4f69f..ed55ce1a6959c24658ea18a7190ba98cffbc9e35 100644 (file)
@@ -658,7 +658,7 @@ AutomationTimeAxisView::add_automation_event (GdkEvent* event, framepos_t when,
 }
 
 bool
-AutomationTimeAxisView::paste (framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t& sub_num)
+AutomationTimeAxisView::paste (framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t sub_num)
 {
        if (_line) {
                return paste_one (pos, ctx.count, ctx.times, selection, ctx.counts, ctx.greedy);
index f352dae1ed10f8bf08f5899aeae5581dec797087..7852e21ed7e30e8d0dce5cdc32f0f3c3710e36bf 100644 (file)
@@ -97,7 +97,7 @@ class AutomationTimeAxisView : public TimeAxisView {
        /* editing operations */
 
        void cut_copy_clear (Selection&, Editing::CutCopyOp);
-       bool paste (ARDOUR::framepos_t, const Selection&, PasteContext&, const int32_t& sub_num);
+       bool paste (ARDOUR::framepos_t, const Selection&, PasteContext&, const int32_t sub_num);
 
        int  set_state (const XMLNode&, int version);
 
index 7c224a1d0c1b7548ae92ece57fec5056790f1b76..d45545b4a703495835b8744e0053aa44c4a771e9 100644 (file)
@@ -534,7 +534,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        /* editing operations that need to be public */
        void mouse_add_new_marker (framepos_t where, bool is_cd=false);
-       void split_regions_at (framepos_t, RegionSelection&, const int32_t& sub_num);
+       void split_regions_at (framepos_t, RegionSelection&, const int32_t sub_num);
        void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
        RegionSelection get_regions_from_selection_and_mouse (framepos_t);
 
@@ -1190,7 +1190,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void cut_copy_midi (Editing::CutCopyOp);
 
        void mouse_paste ();
-       void paste_internal (framepos_t position, float times, const int32_t& sub_num);
+       void paste_internal (framepos_t position, float times, const int32_t sub_num);
 
        /* EDITING OPERATIONS */
 
index c8afd814761f88ead29df2d7ca9ac3c461343dc9..4516eefb62bb05ae9a3c246ed991a1b071d0b7d6 100644 (file)
@@ -510,7 +510,7 @@ Drag::show_verbose_cursor_text (string const & text)
 }
 
 boost::shared_ptr<Region>
-Drag::add_midi_region (MidiTimeAxisView* view, bool commit, const int32_t& sub_num)
+Drag::add_midi_region (MidiTimeAxisView* view, bool commit, const int32_t sub_num)
 {
        if (_editor->session()) {
                const TempoMap& map (_editor->session()->tempo_map());
@@ -1741,7 +1741,7 @@ RegionMoveDrag::insert_region_into_playlist (
        layer_t dest_layer,
        framecnt_t where,
        PlaylistSet& modified_playlists,
-       const int32_t& sub_num
+       const int32_t sub_num
        )
 {
        boost::shared_ptr<Playlist> dest_playlist = dest_rtv->playlist ();
index 911b8fbf3582ad80ad45f1576ad354414b5dafdd..cc0e9d95ddc7761725b48818114ec315ac3f39fc 100644 (file)
@@ -248,7 +248,7 @@ protected:
        /* sets snap delta from unsnapped pos */
        void setup_snap_delta (framepos_t pos);
 
-       boost::shared_ptr<ARDOUR::Region> add_midi_region (MidiTimeAxisView*, bool commit, const int32_t& sub_num);
+       boost::shared_ptr<ARDOUR::Region> add_midi_region (MidiTimeAxisView*, bool commit, const int32_t sub_num);
 
        void show_verbose_cursor_time (framepos_t);
        void show_verbose_cursor_duration (framepos_t, framepos_t, double xoffset = 0);
@@ -424,7 +424,7 @@ private:
                ARDOUR::layer_t,
                ARDOUR::framecnt_t,
                PlaylistSet&,
-               const int32_t& sub_num
+               const int32_t sub_num
                );
 
        void remove_region_from_playlist (
index 117c80262fe48c21f0040de234f2f900270e9d98..63d3570b8b519cbc69af1b7afd7f5c6b4956f2ee 100644 (file)
@@ -151,7 +151,7 @@ Editor::redo (uint32_t n)
 }
 
 void
-Editor::split_regions_at (framepos_t where, RegionSelection& regions, const int32_t& sub_num)
+Editor::split_regions_at (framepos_t where, RegionSelection& regions, const int32_t sub_num)
 {
        bool frozen = false;
 
@@ -4653,7 +4653,7 @@ Editor::mouse_paste ()
 }
 
 void
-Editor::paste_internal (framepos_t position, float times, const int32_t& sub_num)
+Editor::paste_internal (framepos_t position, float times, const int32_t sub_num)
 {
         DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("apparent paste position is %1\n", position));
 
index 7a45da5c40b1f86f038a514938b2cbfe853eec1f..987a9fff35ef0c40ace7f6ed160f3c190cf49e97 100644 (file)
@@ -3524,7 +3524,7 @@ MidiRegionView::selection_as_cut_buffer () const
 
 /** This method handles undo */
 bool
-MidiRegionView::paste (framepos_t pos, const ::Selection& selection, PasteContext& ctx, const int32_t& sub_num)
+MidiRegionView::paste (framepos_t pos, const ::Selection& selection, PasteContext& ctx, const int32_t sub_num)
 {
        bool commit = false;
        // Paste notes, if available
index fd423a3d0c0783afc603dc2651f49f076f35cd26..afe2f4a97da934dffd622ec786082eca2dcd7d68 100644 (file)
@@ -122,7 +122,7 @@ public:
        void resolve_note(uint8_t note_num, Evoral::Beats end_time);
 
        void cut_copy_clear (Editing::CutCopyOp);
-       bool paste (framepos_t pos, const ::Selection& selection, PasteContext& ctx, const int32_t& sub_num);
+       bool paste (framepos_t pos, const ::Selection& selection, PasteContext& ctx, const int32_t sub_num);
        void paste_internal (framepos_t pos, unsigned paste_count, float times, const MidiCutBuffer&);
 
        void add_canvas_patch_change (ARDOUR::MidiModel::PatchChangePtr patch, const std::string& displaytext, bool);
index 24328148d476c8b483f951ae8c3b62824d6e60c3..6bd6775618de498d2c34d4b4235863a02b8d78a9 100644 (file)
@@ -662,7 +662,7 @@ struct RegionPositionSorter {
 };
 
 bool
-MidiStreamView::paste (ARDOUR::framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t& sub_num)
+MidiStreamView::paste (ARDOUR::framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t sub_num)
 {
        /* Paste into the first region which starts on or before pos.  Only called when
           using an internal editing tool. */
index 582c72fc1ff0ca1b9a48bf2ca9a7b9d22656fd79..59cf2da9d7d021bbddd37df0942f3b72044ba45b 100644 (file)
@@ -98,7 +98,7 @@ class MidiStreamView : public StreamView
 
        RegionView* create_region_view (boost::shared_ptr<ARDOUR::Region>, bool, bool);
 
-       bool paste (ARDOUR::framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t& sub_num);
+       bool paste (ARDOUR::framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t sub_num);
 
        void apply_note_range(uint8_t lowest, uint8_t highest, bool to_region_views);
 
index 81c8a3736d38c93246679a73b821d255b160f452..ac39c557aecf9567462c1fe49976e7d3fb9b1728 100644 (file)
@@ -1508,7 +1508,7 @@ MidiTimeAxisView::automation_child_menu_item (Evoral::Parameter param)
 }
 
 boost::shared_ptr<MidiRegion>
-MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit, const int32_t& sub_num)
+MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit, const int32_t sub_num)
 {
        Editor* real_editor = dynamic_cast<Editor*> (&_editor);
        if (commit) {
@@ -1635,7 +1635,7 @@ MidiTimeAxisView::capture_channel_mode_changed ()
 }
 
 bool
-MidiTimeAxisView::paste (framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t& sub_num)
+MidiTimeAxisView::paste (framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t sub_num)
 {
        if (!_editor.internal_editing()) {
                // Non-internal paste, paste regions like any other route
index 4b78553d8cb5636f9b77d43f14ea2c1dfe175e3a..fa6102c3609ff114d794aebd8bd29028207119a3 100644 (file)
@@ -82,13 +82,13 @@ public:
 
        void set_height (uint32_t, TrackHeightMode m = OnlySelf);
 
-       boost::shared_ptr<ARDOUR::MidiRegion> add_region (ARDOUR::framepos_t, ARDOUR::framecnt_t, bool, const int32_t& sub_num);
+       boost::shared_ptr<ARDOUR::MidiRegion> add_region (ARDOUR::framepos_t, ARDOUR::framecnt_t, bool, const int32_t sub_num);
 
        void show_all_automation (bool apply_to_selection = false);
        void show_existing_automation (bool apply_to_selection = false);
        void create_automation_child (const Evoral::Parameter& param, bool show);
 
-       bool paste (ARDOUR::framepos_t, const Selection&, PasteContext& ctx, const int32_t& sub_num);
+       bool paste (ARDOUR::framepos_t, const Selection&, PasteContext& ctx, const int32_t sub_num);
 
        ARDOUR::NoteMode  note_mode() const { return _note_mode; }
        ARDOUR::ColorMode color_mode() const { return _color_mode; }
index a86169b4dbac61c57a1170c5b4d189cac61c6649..69c081b94dd169b1c0190aa152ab17bc82a74756 100644 (file)
@@ -289,7 +289,7 @@ class PublicEditor : public Gtkmm2ext::Tabbable {
        virtual void restore_editing_space () = 0;
        virtual framepos_t get_preferred_edit_position (Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE, bool from_context_menu = false, bool from_outside_canvas = false) = 0;
        virtual void toggle_meter_updating() = 0;
-       virtual void split_regions_at (framepos_t, RegionSelection&, const int32_t& sub_num) = 0;
+       virtual void split_regions_at (framepos_t, RegionSelection&, const int32_t sub_num) = 0;
        virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false) = 0;
        virtual void mouse_add_new_marker (framepos_t where, bool is_cd=false) = 0;
        virtual void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>) = 0;
index 16bf44a6897a50b83dcfb7e541235e2524e1eeda..1e848cf33903655efdb1f23c3ae2cbc94f787bf4 100644 (file)
@@ -834,7 +834,7 @@ RegionView::update_coverage_frames (LayerDisplay d)
 }
 
 bool
-RegionView::trim_front (framepos_t new_bound, bool no_overlap, const int32_t& sub_num)
+RegionView::trim_front (framepos_t new_bound, bool no_overlap, const int32_t sub_num)
 {
        if (_region->locked()) {
                return false;
@@ -876,7 +876,7 @@ RegionView::trim_front (framepos_t new_bound, bool no_overlap, const int32_t& su
 }
 
 bool
-RegionView::trim_end (framepos_t new_bound, bool no_overlap, const int32_t& sub_num)
+RegionView::trim_end (framepos_t new_bound, bool no_overlap, const int32_t sub_num)
 {
        if (_region->locked()) {
                return false;
index 40485f93cfebc77b44d80a6cbb46715551f9919f..7fad731dc26cd82e6814af7875c162ade9212f9b 100644 (file)
@@ -102,12 +102,12 @@ class RegionView : public TimeAxisViewItem
        /** Called when a front trim is about to begin */
        virtual void trim_front_starting () {}
 
-       bool trim_front (framepos_t, bool, const int32_t& sub_num);
+       bool trim_front (framepos_t, bool, const int32_t sub_num);
 
        /** Called when a start trim has finished */
        virtual void trim_front_ending () {}
 
-       bool trim_end (framepos_t, bool, const int32_t& sub_num);
+       bool trim_end (framepos_t, bool, const int32_t sub_num);
         void move_contents (ARDOUR::frameoffset_t);
        virtual void thaw_after_trim ();
 
index 6d377df96b2ab734c007c7f15f7b14347f300013..c6c8b3900063c07a74909f31ba748a3d3b4b579f 100644 (file)
@@ -1585,7 +1585,7 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
 }
 
 bool
-RouteTimeAxisView::paste (framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t& sub_num)
+RouteTimeAxisView::paste (framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t sub_num)
 {
        if (!is_track()) {
                return false;
index efa2bfafb86f194989bfba4dd15a2f0dbe4fe043..0634890e515b6f33b84d3d0063d272eb867c966b 100644 (file)
@@ -107,7 +107,7 @@ public:
 
        /* Editing operations */
        void cut_copy_clear (Selection&, Editing::CutCopyOp);
-       bool paste (ARDOUR::framepos_t, const Selection&, PasteContext& ctx, const int32_t& sub_num);
+       bool paste (ARDOUR::framepos_t, const Selection&, PasteContext& ctx, const int32_t sub_num);
        RegionView* combine_regions ();
        void uncombine_regions ();
        void uncombine_region (RegionView*);
index 2ad221495207db60dee646a06755818377f9769f..e4e30fdc4f4726b02d8204a832856e57a793e1b6 100644 (file)
@@ -186,7 +186,7 @@ class TimeAxisView : public virtual AxisView
        virtual bool paste (ARDOUR::framepos_t pos,
                            const Selection&   selection,
                            PasteContext&      ctx,
-                           const int32_t& sub_num) { return false; }
+                           const int32_t sub_num) { return false; }
 
        virtual void set_selected_regionviews (RegionSelection&) {}
        virtual void set_selected_points (PointSelection&) {}
index bed64615b5d3b0cd2a3f3e644f9a6f129015dea2..c3003e587bba29b9dbaaaa7e0d5c843da0af12fe 100644 (file)
@@ -180,7 +180,7 @@ class LIBARDOUR_API AudioRegion : public Region
        AudioRegion (boost::shared_ptr<AudioSource>);
        AudioRegion (const SourceList &);
        AudioRegion (boost::shared_ptr<const AudioRegion>);
-       AudioRegion (boost::shared_ptr<const AudioRegion>, frameoffset_t offset, const int32_t& sub_num);
+       AudioRegion (boost::shared_ptr<const AudioRegion>, frameoffset_t offset, const int32_t sub_num);
        AudioRegion (boost::shared_ptr<const AudioRegion>, const SourceList&);
        AudioRegion (SourceList &);
 
index 21d6c13ade5fca7da322fb9700e3f60ca9ae5a36..197dcdbe6c64e46c8faccd753361ce40dec7bd17 100644 (file)
@@ -116,7 +116,7 @@ class LIBARDOUR_API MidiRegion : public Region
 
        MidiRegion (const SourceList&);
        MidiRegion (boost::shared_ptr<const MidiRegion>);
-       MidiRegion (boost::shared_ptr<const MidiRegion>, frameoffset_t offset, const int32_t& sub_num = 0);
+       MidiRegion (boost::shared_ptr<const MidiRegion>, frameoffset_t offset, const int32_t sub_num = 0);
 
        framecnt_t _read_at (const SourceList&, Evoral::EventSink<framepos_t>& dst,
                             framepos_t position,
@@ -132,11 +132,11 @@ class LIBARDOUR_API MidiRegion : public Region
        void recompute_at_start ();
        void recompute_at_end ();
 
-       void set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t& sub_num);
-       void set_length_internal (framecnt_t len, const int32_t& sub_num);
-       void set_start_internal (framecnt_t, const int32_t& sub_num);
-       void trim_to_internal (framepos_t position, framecnt_t length, const int32_t& sub_num);
-       void update_length_beats (const int32_t& sub_num);
+       void set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t sub_num);
+       void set_length_internal (framecnt_t len, const int32_t sub_num);
+       void set_start_internal (framecnt_t, const int32_t sub_num);
+       void trim_to_internal (framepos_t position, framecnt_t length, const int32_t sub_num);
+       void update_length_beats (const int32_t sub_num);
 
        void model_changed ();
        void model_automation_state_changed (Evoral::Parameter const &);
index 09c31360eca86d01129e57c81e6d8d57edefd7c3..04615acb26d0874c7c7d6b818adf376cf7b28902 100644 (file)
@@ -128,14 +128,14 @@ public:
 
        /* Editing operations */
 
-       void add_region (boost::shared_ptr<Region>, framepos_t position, float times = 1, bool auto_partition = false, const int32_t& sub_num = 0);
+       void add_region (boost::shared_ptr<Region>, framepos_t position, float times = 1, bool auto_partition = false, const int32_t sub_num = 0);
        void remove_region (boost::shared_ptr<Region>);
        void get_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
        void get_region_list_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
        void get_source_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
        void replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, framepos_t pos);
-       void split_region (boost::shared_ptr<Region>, framepos_t position, const int32_t& sub_num);
-       void split (framepos_t at, const int32_t& sub_num);
+       void split_region (boost::shared_ptr<Region>, framepos_t position, const int32_t sub_num);
+       void split (framepos_t at, const int32_t sub_num);
        void shift (framepos_t at, frameoffset_t distance, bool move_intersected, bool ignore_music_glue);
        void partition (framepos_t start, framepos_t end, bool cut = false);
        void duplicate (boost::shared_ptr<Region>, framepos_t position, float times);
@@ -161,7 +161,7 @@ public:
 
        boost::shared_ptr<Playlist> cut  (std::list<AudioRange>&, bool result_is_hidden = true);
        boost::shared_ptr<Playlist> copy (std::list<AudioRange>&, bool result_is_hidden = true);
-       int                         paste (boost::shared_ptr<Playlist>, framepos_t position, float times, const int32_t& sub_num);
+       int                         paste (boost::shared_ptr<Playlist>, framepos_t position, float times, const int32_t sub_num);
 
        const RegionListProperty& region_list_property () const { return regions; }
        boost::shared_ptr<RegionList> region_list();
@@ -362,7 +362,7 @@ public:
 
        virtual XMLNode& state (bool);
 
-       bool add_region_internal (boost::shared_ptr<Region>, framepos_t position, const int32_t& sub_num = 0);
+       bool add_region_internal (boost::shared_ptr<Region>, framepos_t position, const int32_t sub_num = 0);
 
        int remove_region_internal (boost::shared_ptr<Region>);
        void copy_regions (RegionList&) const;
@@ -380,7 +380,7 @@ public:
        void begin_undo ();
        void end_undo ();
 
-       void _split_region (boost::shared_ptr<Region>, framepos_t position, const int32_t& sub_num);
+       void _split_region (boost::shared_ptr<Region>, framepos_t position, const int32_t sub_num);
 
        typedef std::pair<boost::shared_ptr<Region>, boost::shared_ptr<Region> > TwoRegions;
 
index 7f41cb6e5a7cf7b5e377730c6bc64e0d926ecf61..4c3facf5113ec0dbf88f3d5ec88fae89e568b0be 100644 (file)
@@ -172,7 +172,7 @@ class LIBARDOUR_API Region
 
        PositionLockStyle position_lock_style () const { return _position_lock_style; }
        void set_position_lock_style (PositionLockStyle ps);
-       void recompute_position_from_lock_style (const int32_t& sub_num);
+       void recompute_position_from_lock_style (const int32_t sub_num);
 
        double beat () const { return _beat; }
        void set_beat (double beat) { _beat = beat; }
@@ -207,7 +207,7 @@ class LIBARDOUR_API Region
 
        /* EDITING OPERATIONS */
 
-       void set_length (framecnt_t, const int32_t& sub_num);
+       void set_length (framecnt_t, const int32_t sub_num);
        void set_start (framepos_t);
        void set_position (framepos_t, int32_t sub_num = 0);
        void set_initial_position (framepos_t);
@@ -218,15 +218,15 @@ class LIBARDOUR_API Region
        bool at_natural_position () const;
        void move_to_natural_position ();
 
-       void move_start (frameoffset_t distance, const int32_t& sub_num = 0);
-       void trim_front (framepos_t new_position, const int32_t& sub_num = 0);
-       void trim_end (framepos_t new_position, const int32_t& sub_num = 0);
-       void trim_to (framepos_t position, framecnt_t length, const int32_t& sub_num = 0);
+       void move_start (frameoffset_t distance, const int32_t sub_num = 0);
+       void trim_front (framepos_t new_position, const int32_t sub_num = 0);
+       void trim_end (framepos_t new_position, const int32_t sub_num = 0);
+       void trim_to (framepos_t position, framecnt_t length, const int32_t sub_num = 0);
 
        virtual void fade_range (framepos_t, framepos_t) {}
 
-       void cut_front (framepos_t new_position, const int32_t& sub_num = 0);
-       void cut_end (framepos_t new_position, const int32_t& sub_num = 0);
+       void cut_front (framepos_t new_position, const int32_t sub_num = 0);
+       void cut_end (framepos_t new_position, const int32_t sub_num = 0);
 
        void set_layer (layer_t l); /* ONLY Playlist can call this */
        void raise ();
@@ -341,7 +341,7 @@ class LIBARDOUR_API Region
        Region (boost::shared_ptr<const Region>);
 
        /** Construct a region from another region, at an offset within that region */
-       Region (boost::shared_ptr<const Region>, frameoffset_t start_offset, const int32_t& sub_num);
+       Region (boost::shared_ptr<const Region>, frameoffset_t start_offset, const int32_t sub_num);
 
        /** Construct a region as a copy of another region, but with different sources */
        Region (boost::shared_ptr<const Region>, const SourceList&);
@@ -358,9 +358,9 @@ class LIBARDOUR_API Region
        void send_change (const PBD::PropertyChange&);
        virtual int _set_state (const XMLNode&, int version, PBD::PropertyChange& what_changed, bool send_signal);
        void post_set (const PBD::PropertyChange&);
-       virtual void set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t& sub_num);
-       virtual void set_length_internal (framecnt_t, const int32_t& sub_num);
-       virtual void set_start_internal (framecnt_t, const int32_t& sub_num = 0);
+       virtual void set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t sub_num);
+       virtual void set_length_internal (framecnt_t, const int32_t sub_num);
+       virtual void set_start_internal (framecnt_t, const int32_t sub_num = 0);
        bool verify_start_and_length (framepos_t, framecnt_t&);
        void first_edit ();
 
@@ -398,9 +398,9 @@ class LIBARDOUR_API Region
   private:
        void mid_thaw (const PBD::PropertyChange&);
 
-       virtual void trim_to_internal (framepos_t position, framecnt_t length, const int32_t& sub_num);
-       void modify_front (framepos_t new_position, bool reset_fade, const int32_t& sub_num);
-       void modify_end (framepos_t new_position, bool reset_fade, const int32_t& sub_num);
+       virtual void trim_to_internal (framepos_t position, framecnt_t length, const int32_t sub_num);
+       void modify_front (framepos_t new_position, bool reset_fade, const int32_t sub_num);
+       void modify_end (framepos_t new_position, bool reset_fade, const int32_t sub_num);
 
        void maybe_uncopy ();
 
index e331de2b006bfe4811152c2f69f374333d49d883..6971e772426f94c8d69a12202eed4cdb185b91cf 100644 (file)
@@ -59,7 +59,7 @@ public:
        static PBD::Signal1<void,boost::shared_ptr<Region> >  CheckNewRegion;
 
        /** create a "pure copy" of Region @param other */
-       static boost::shared_ptr<Region> create (boost::shared_ptr<const Region> other, bool announce = false, const int32_t& sub_num = 0);
+       static boost::shared_ptr<Region> create (boost::shared_ptr<const Region> other, bool announce = false, const int32_t sub_num = 0);
 
        /** create a region from a single Source */
        static boost::shared_ptr<Region> create (boost::shared_ptr<Source>,
@@ -73,7 +73,7 @@ public:
                                                 const PBD::PropertyList&, bool announce = true);
        /** create a copy of @param other starting at @param offset within @param other */
        static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, frameoffset_t offset,
-                                                const PBD::PropertyList&, bool announce = true, const int32_t& sub_num = 0);
+                                                const PBD::PropertyList&, bool announce = true, const int32_t sub_num = 0);
        /** create a "copy" of @param other but using a different set of sources @param srcs */
        static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, const SourceList& srcs,
                                                 const PBD::PropertyList&, bool announce = true);
index 0a9585c3dced0dac8ac399baa550af2566627473..5fce9ce384a8fe68ca78f91531b4ec9fa48623d1 100644 (file)
@@ -452,7 +452,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
        bool gui_change_tempo (TempoSection*, const Tempo& bpm);
        void gui_dilate_tempo (TempoSection* tempo, const framepos_t& frame, const framepos_t& end_frame, const double& pulse);
 
-       double exact_beat_at_frame (const framepos_t& frame, const int32_t& sub_num);
+       double exact_beat_at_frame (const framepos_t& frame, const int32_t sub_num);
 
        std::pair<double, framepos_t> predict_tempo_position (TempoSection* section, const Timecode::BBT_Time& bbt);
        bool can_solve_bbt (TempoSection* section, const Timecode::BBT_Time& bbt);
@@ -497,7 +497,7 @@ private:
        bool solve_map_frame (Metrics& metrics, MeterSection* section, const framepos_t& frame);
        bool solve_map_bbt (Metrics& metrics, MeterSection* section, const Timecode::BBT_Time& bbt);
 
-       double exact_beat_at_frame_locked (const Metrics& metrics, const framepos_t& frame, const int32_t& sub_num);
+       double exact_beat_at_frame_locked (const Metrics& metrics, const framepos_t& frame, const int32_t sub_num);
 
        friend class ::BBTTest;
        friend class ::FrameposPlusBeatsTest;
index dff261a9dfe2f87a405a65ebb01f8bb1031b5d92..2917f155d3ceb482a1801d23f5d4e7f805e5befc 100644 (file)
@@ -279,7 +279,7 @@ AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other)
        assert (_sources.size() == _master_sources.size());
 }
 
-AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other, framecnt_t offset, const int32_t& sub_num)
+AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other, framecnt_t offset, const int32_t sub_num)
        : Region (other, offset, sub_num)
        , AUDIOREGION_COPY_STATE (other)
          /* As far as I can see, the _envelope's times are relative to region position, and have nothing
index 9871fa219fda8340e73e12caef0a41b4359325a7..14b29eb6d40b7daa7593ed942717183320d3376c 100644 (file)
@@ -102,7 +102,7 @@ MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other)
 }
 
 /** Create a new MidiRegion that is part of an existing one */
-MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other, frameoffset_t offset, const int32_t& sub_num)
+MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other, frameoffset_t offset, const int32_t sub_num)
        : Region (other, offset, sub_num)
        , _start_beats (Properties::start_beats, Evoral::Beats())
        , _length_beats (Properties::length_beats, other->_length_beats)
@@ -188,7 +188,7 @@ MidiRegion::set_start_beats_from_start_frames ()
 }
 
 void
-MidiRegion::set_length_internal (framecnt_t len, const int32_t& sub_num)
+MidiRegion::set_length_internal (framecnt_t len, const int32_t sub_num)
 {
        Region::set_length_internal (len, sub_num);
        update_length_beats (sub_num);
@@ -227,13 +227,13 @@ MidiRegion::update_after_tempo_map_change (bool /* send */)
 }
 
 void
-MidiRegion::update_length_beats (const int32_t& sub_num)
+MidiRegion::update_length_beats (const int32_t sub_num)
 {
        _length_beats = Evoral::Beats (_session.tempo_map().exact_beat_at_frame (_position + _length, sub_num) - beat());
 }
 
 void
-MidiRegion::set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t& sub_num)
+MidiRegion::set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t sub_num)
 {
        Region::set_position_internal (pos, allow_bbt_recompute, sub_num);
 
@@ -486,7 +486,7 @@ MidiRegion::fix_negative_start ()
 }
 
 void
-MidiRegion::set_start_internal (framecnt_t s, const int32_t& sub_num)
+MidiRegion::set_start_internal (framecnt_t s, const int32_t sub_num)
 {
        Region::set_start_internal (s, sub_num);
 
@@ -496,7 +496,7 @@ MidiRegion::set_start_internal (framecnt_t s, const int32_t& sub_num)
 }
 
 void
-MidiRegion::trim_to_internal (framepos_t position, framecnt_t length, const int32_t& sub_num)
+MidiRegion::trim_to_internal (framepos_t position, framecnt_t length, const int32_t sub_num)
 {
        framepos_t new_start;
 
index eeff036248c364a5f08408c2a7c2475c3ce94ec4..de13d0eeb1275b4ddef86d1416dcdc411ce73928 100644 (file)
@@ -666,7 +666,7 @@ Playlist::flush_notifications (bool from_undo)
 
 /** Note: this calls set_layer (..., DBL_MAX) so it will reset the layering index of region */
  void
- Playlist::add_region (boost::shared_ptr<Region> region, framepos_t position, float times, bool auto_partition, const int32_t& sub_num)
+ Playlist::add_region (boost::shared_ptr<Region> region, framepos_t position, float times, bool auto_partition, const int32_t sub_num)
  {
         RegionWriteLock rlock (this);
         times = fabs (times);
@@ -735,7 +735,7 @@ Playlist::flush_notifications (bool from_undo)
  }
 
  bool
- Playlist::add_region_internal (boost::shared_ptr<Region> region, framepos_t position, const int32_t& sub_num)
+ Playlist::add_region_internal (boost::shared_ptr<Region> region, framepos_t position, const int32_t sub_num)
  {
         if (region->data_type() != _type) {
                 return false;
@@ -1209,7 +1209,7 @@ Playlist::flush_notifications (bool from_undo)
  }
 
  int
- Playlist::paste (boost::shared_ptr<Playlist> other, framepos_t position, float times, const int32_t& sub_num)
+ Playlist::paste (boost::shared_ptr<Playlist> other, framepos_t position, float times, const int32_t sub_num)
  {
         times = fabs (times);
 
@@ -1390,7 +1390,7 @@ Playlist::duplicate_ranges (std::list<AudioRange>& ranges, float /* times */)
  }
 
  void
- Playlist::split (framepos_t at, const int32_t& sub_num)
+ Playlist::split (framepos_t at, const int32_t sub_num)
  {
         RegionWriteLock rlock (this);
         RegionList copy (regions.rlist());
@@ -1404,14 +1404,14 @@ Playlist::duplicate_ranges (std::list<AudioRange>& ranges, float /* times */)
  }
 
  void
- Playlist::split_region (boost::shared_ptr<Region> region, framepos_t playlist_position, const int32_t& sub_num)
+ Playlist::split_region (boost::shared_ptr<Region> region, framepos_t playlist_position, const int32_t sub_num)
  {
         RegionWriteLock rl (this);
         _split_region (region, playlist_position, sub_num);
  }
 
  void
- Playlist::_split_region (boost::shared_ptr<Region> region, framepos_t playlist_position, const int32_t& sub_num)
+ Playlist::_split_region (boost::shared_ptr<Region> region, framepos_t playlist_position, const int32_t sub_num)
  {
         if (!region->covers (playlist_position)) {
                 return;
index e9b3f59bda61c5ea2f6e6d598fc15c47b257569c..039ecbe691d129670346b2b043dc098f30a90170 100644 (file)
@@ -320,7 +320,7 @@ Region::Region (boost::shared_ptr<const Region> other)
     the start within \a other is given by \a offset
     (i.e. relative to the start of \a other's sources, the start is \a offset + \a other.start()
 */
-Region::Region (boost::shared_ptr<const Region> other, frameoffset_t offset, const int32_t& sub_num)
+Region::Region (boost::shared_ptr<const Region> other, frameoffset_t offset, const int32_t sub_num)
        : SessionObject(other->session(), other->name())
        , _type (other->data_type())
        , REGION_COPY_STATE (other)
@@ -419,7 +419,7 @@ Region::set_name (const std::string& str)
 }
 
 void
-Region::set_length (framecnt_t len, const int32_t& sub_num)
+Region::set_length (framecnt_t len, const int32_t sub_num)
 {
        //cerr << "Region::set_length() len = " << len << endl;
        if (locked()) {
@@ -456,7 +456,7 @@ Region::set_length (framecnt_t len, const int32_t& sub_num)
 }
 
 void
-Region::set_length_internal (framecnt_t len, const int32_t& sub_num)
+Region::set_length_internal (framecnt_t len, const int32_t sub_num)
 {
        _last_length = _length;
        _length = len;
@@ -643,7 +643,7 @@ Region::set_initial_position (framepos_t pos)
 }
 
 void
-Region::set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t& sub_num)
+Region::set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t sub_num)
 {
        /* We emit a change of Properties::position even if the position hasn't changed
           (see Region::set_position), so we must always set this up so that
@@ -670,7 +670,7 @@ Region::set_position_internal (framepos_t pos, bool allow_bbt_recompute, const i
 }
 
 void
-Region::recompute_position_from_lock_style (const int32_t& sub_num)
+Region::recompute_position_from_lock_style (const int32_t sub_num)
 {
        _beat = _session.tempo_map().exact_beat_at_frame (_position, sub_num);
 }
@@ -743,7 +743,7 @@ Region::set_start (framepos_t pos)
 }
 
 void
-Region::move_start (frameoffset_t distance, const int32_t& sub_num)
+Region::move_start (frameoffset_t distance, const int32_t sub_num)
 {
        if (locked() || position_locked() || video_locked()) {
                return;
@@ -788,25 +788,25 @@ Region::move_start (frameoffset_t distance, const int32_t& sub_num)
 }
 
 void
-Region::trim_front (framepos_t new_position, const int32_t& sub_num)
+Region::trim_front (framepos_t new_position, const int32_t sub_num)
 {
        modify_front (new_position, false, sub_num);
 }
 
 void
-Region::cut_front (framepos_t new_position, const int32_t& sub_num)
+Region::cut_front (framepos_t new_position, const int32_t sub_num)
 {
        modify_front (new_position, true, sub_num);
 }
 
 void
-Region::cut_end (framepos_t new_endpoint, const int32_t& sub_num)
+Region::cut_end (framepos_t new_endpoint, const int32_t sub_num)
 {
        modify_end (new_endpoint, true, sub_num);
 }
 
 void
-Region::modify_front (framepos_t new_position, bool reset_fade, const int32_t& sub_num)
+Region::modify_front (framepos_t new_position, bool reset_fade, const int32_t sub_num)
 {
        if (locked()) {
                return;
@@ -851,7 +851,7 @@ Region::modify_front (framepos_t new_position, bool reset_fade, const int32_t& s
 }
 
 void
-Region::modify_end (framepos_t new_endpoint, bool reset_fade, const int32_t& sub_num)
+Region::modify_end (framepos_t new_endpoint, bool reset_fade, const int32_t sub_num)
 {
        if (locked()) {
                return;
@@ -873,13 +873,13 @@ Region::modify_end (framepos_t new_endpoint, bool reset_fade, const int32_t& sub
  */
 
 void
-Region::trim_end (framepos_t new_endpoint, const int32_t& sub_num)
+Region::trim_end (framepos_t new_endpoint, const int32_t sub_num)
 {
        modify_end (new_endpoint, false, sub_num);
 }
 
 void
-Region::trim_to (framepos_t position, framecnt_t length, const int32_t& sub_num)
+Region::trim_to (framepos_t position, framecnt_t length, const int32_t sub_num)
 {
        if (locked()) {
                return;
@@ -894,7 +894,7 @@ Region::trim_to (framepos_t position, framecnt_t length, const int32_t& sub_num)
 }
 
 void
-Region::trim_to_internal (framepos_t position, framecnt_t length, const int32_t& sub_num)
+Region::trim_to_internal (framepos_t position, framecnt_t length, const int32_t sub_num)
 {
        framepos_t new_start;
 
@@ -1850,7 +1850,7 @@ Region::post_set (const PropertyChange& pc)
 }
 
 void
-Region::set_start_internal (framecnt_t s, const int32_t& sub_num)
+Region::set_start_internal (framecnt_t s, const int32_t sub_num)
 {
        _start = s;
 }
index e724683eda38b02e216a9dbac815ca2cd7270630..6578e89837c2346c91049b8af6985d428457b7c0 100644 (file)
@@ -46,7 +46,7 @@ std::map<std::string, PBD::ID>                RegionFactory::region_name_map;
 RegionFactory::CompoundAssociations           RegionFactory::_compound_associations;
 
 boost::shared_ptr<Region>
-RegionFactory::create (boost::shared_ptr<const Region> region, bool announce, const int32_t& sub_num)
+RegionFactory::create (boost::shared_ptr<const Region> region, bool announce, const int32_t sub_num)
 {
        boost::shared_ptr<Region> ret;
        boost::shared_ptr<const AudioRegion> ar;
@@ -144,7 +144,7 @@ RegionFactory::create (boost::shared_ptr<Region> region, const PropertyList& pli
 }
 
 boost::shared_ptr<Region>
-RegionFactory::create (boost::shared_ptr<Region> region, frameoffset_t offset, const PropertyList& plist, bool announce, const int32_t& sub_num)
+RegionFactory::create (boost::shared_ptr<Region> region, frameoffset_t offset, const PropertyList& plist, bool announce, const int32_t sub_num)
 {
        boost::shared_ptr<Region> ret;
        boost::shared_ptr<const AudioRegion> other_a;
index 9862126873a1169334b51bb6fe1c95233385b526..05d3d89c15adbc87bf7bc62c284d9f6745a3735f 100644 (file)
@@ -2978,7 +2978,7 @@ TempoMap::gui_dilate_tempo (TempoSection* ts, const framepos_t& frame, const fra
 }
 
 double
-TempoMap::exact_beat_at_frame (const framepos_t& frame, const int32_t& sub_num)
+TempoMap::exact_beat_at_frame (const framepos_t& frame, const int32_t sub_num)
 {
        Glib::Threads::RWLock::ReaderLock lm (lock);
 
@@ -2986,7 +2986,7 @@ TempoMap::exact_beat_at_frame (const framepos_t& frame, const int32_t& sub_num)
 }
 
 double
-TempoMap::exact_beat_at_frame_locked (const Metrics& metrics, const framepos_t& frame, const int32_t& sub_num)
+TempoMap::exact_beat_at_frame_locked (const Metrics& metrics, const framepos_t& frame, const int32_t sub_num)
 {
        double beat = beat_at_frame_locked (metrics, frame);
        if (sub_num > 1) {