mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-05 05:05:43 +01:00
Reorder initialisation to prevent access to an uninitialised variable.
git-svn-id: svn://localhost/ardour2/branches/3.0@5579 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f9e30c4c08
commit
cee3c427d7
1 changed files with 6 additions and 5 deletions
|
|
@ -48,11 +48,12 @@ RegionSelection::RegionSelection (const RegionSelection& other)
|
|||
{
|
||||
RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
|
||||
|
||||
_current_start = other._current_start;
|
||||
_current_end = other._current_end;
|
||||
|
||||
for (RegionSelection::const_iterator i = other.begin(); i != other.end(); ++i) {
|
||||
add (*i);
|
||||
}
|
||||
_current_start = other._current_start;
|
||||
_current_end = other._current_end;
|
||||
}
|
||||
|
||||
/** operator= to set a RegionSelection to be the same as another.
|
||||
|
|
@ -65,12 +66,12 @@ RegionSelection::operator= (const RegionSelection& other)
|
|||
|
||||
clear_all();
|
||||
|
||||
_current_start = other._current_start;
|
||||
_current_end = other._current_end;
|
||||
|
||||
for (RegionSelection::const_iterator i = other.begin(); i != other.end(); ++i) {
|
||||
add (*i);
|
||||
}
|
||||
|
||||
_current_start = other._current_start;
|
||||
_current_end = other._current_end;
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue