From: Robin Gareus Date: Fri, 24 Feb 2017 11:59:07 +0000 (+0100) Subject: the daily dose of const'ness X-Git-Tag: 5.7~34 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=89c02f4fd7718935391b8fb292bb1b4f3034635e the daily dose of const'ness --- diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 6ed7a10434..be22b8737a 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -1011,25 +1011,25 @@ Selection::set (boost::shared_ptr ac) } bool -Selection::selected (ArdourMarker* m) +Selection::selected (ArdourMarker* m) const { return find (markers.begin(), markers.end(), m) != markers.end(); } bool -Selection::selected (TimeAxisView* tv) +Selection::selected (TimeAxisView* tv) const { return tv->selected (); } bool -Selection::selected (RegionView* rv) +Selection::selected (RegionView* rv) const { return find (regions.begin(), regions.end(), rv) != regions.end(); } bool -Selection::selected (ControlPoint* cp) +Selection::selected (ControlPoint* cp) const { return find (points.begin(), points.end(), cp) != points.end(); } diff --git a/gtk2_ardour/selection.h b/gtk2_ardour/selection.h index daa81ab1d6..959690b95d 100644 --- a/gtk2_ardour/selection.h +++ b/gtk2_ardour/selection.h @@ -113,10 +113,10 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList void dump_region_layers(); - bool selected (TimeAxisView*); - bool selected (RegionView*); - bool selected (ArdourMarker*); - bool selected (ControlPoint*); + bool selected (TimeAxisView*) const; + bool selected (RegionView*) const; + bool selected (ArdourMarker*) const; + bool selected (ControlPoint*) const; void set (std::list const &); void add (std::list const &);