From 629ded2c61ef25ec34cc52b03fe69d02e72db50f Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 10 Mar 2011 10:11:08 +0000 Subject: [PATCH] Fix shadowed member variable warnings --- source/designer/routebar.cpp | 8 ++++---- source/designer/zonebar.cpp | 16 +++++++--------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/source/designer/routebar.cpp b/source/designer/routebar.cpp index da9a5cf..7749364 100644 --- a/source/designer/routebar.cpp +++ b/source/designer/routebar.cpp @@ -1,7 +1,7 @@ /* $Id$ This file is part of R²C² -Copyright © 2010 Mikkosoft Productions, Mikko Rasa +Copyright © 2010-2011 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -56,9 +56,9 @@ void Routebar::route_selected(unsigned index, const string &) { if(index==drp_routes->get_n_items()-1) { - Layout &layout = designer.get_layout(); - const set &routes = layout.get_routes(); - Route *route = new Route(layout); + Layout &rlayout = designer.get_layout(); + const set &routes = rlayout.get_routes(); + Route *route = new Route(rlayout); route->set_name(format("Route %d", routes.size())); designer.edit_route(route); diff --git a/source/designer/zonebar.cpp b/source/designer/zonebar.cpp index d4e0492..88119c7 100644 --- a/source/designer/zonebar.cpp +++ b/source/designer/zonebar.cpp @@ -1,7 +1,7 @@ /* $Id$ This file is part of R²C² -Copyright © 2010 Mikkosoft Productions, Mikko Rasa +Copyright © 2010-2011 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -46,11 +46,11 @@ Zonebar::Zonebar(Designer &d): btn->set_tooltip("Add selected tracks to zone"); btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::add_selection_to_zone)); - Layout &layout = designer.get_layout(); - layout.signal_zone_added.connect(sigc::mem_fun(this, &Zonebar::zone_added)); - layout.signal_zone_removed.connect(sigc::hide(sigc::mem_fun(this, &Zonebar::update_groups))); + Layout &rlayout = designer.get_layout(); + rlayout.signal_zone_added.connect(sigc::mem_fun(this, &Zonebar::zone_added)); + rlayout.signal_zone_removed.connect(sigc::hide(sigc::mem_fun(this, &Zonebar::update_groups))); - const Layout::ZoneSet &zones = layout.get_zones(); + const Layout::ZoneSet &zones = rlayout.get_zones(); for(Layout::ZoneSet::const_iterator i=zones.begin(); i!=zones.end(); ++i) (*i)->signal_name_changed.connect(sigc::mem_fun(this, &Zonebar::zone_renamed)); @@ -72,8 +72,7 @@ void Zonebar::group_selected(unsigned index, const string &group) { if(index==drp_groups->get_n_items()-1) { - Layout &layout = designer.get_layout(); - Zone *zone = new Zone(layout); + Zone *zone = new Zone(designer.get_layout()); zone->set_name("New zone", "track", 1); designer.edit_zone(zone); update_groups(); @@ -101,8 +100,7 @@ void Zonebar::number_selected(unsigned index, const string &) Zone *cur = designer.get_current_zone(); string qualifier = (cur ? cur->get_qualifier() : "track"); - Layout &layout = designer.get_layout(); - Zone *zone = new Zone(layout); + Zone *zone = new Zone(designer.get_layout()); zone->set_name(group, qualifier, zones.size()+1); designer.edit_zone(zone); if(cur) -- 2.45.2