James Turner wrote:
> On 29 Dec 2009, at 14:28, Erik Hofman wrote:
> 
>> SGSubsystemGroup::unbind ()
>> {
>> -    for (unsigned int i = 0; i < _members.size(); i++)
>> -        _members[i]->subsystem->unbind();
>> +    // reverse order to prevent order dependency problems
>> +    for (unsigned int i = _members.size(); i > 0; i--)
>> +       _members[i-1]->subsystem->unbind();
>> }
> 
> Reverse iterators (rbegin(), rend()) would be a little neater for this.
> 
> (In my opinion, of course!)

You are free to change it. I've had my share of mistakes using iterators 
recently .. :)

Erik

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to