Hi! Looking at aar.nas I noticed some seemingly unnecessary elsif usage, wonder if they are there for a reason:
if (size(selected_tanks) == 0) { } elsif (consumed >= 0) { } elsif (consumed < 0) { <=== HERE } ... and ... if (capacity - lbs >= fuel_per_tank) { } elsif (capacity - lbs < fuel_per_tank) { <=== HERE } Also, I think there might be a bug here: fuel_per_tank is a negative number! Thus the first condition will always be true. As we are in the refuelling branch, I think it would make the code more readable if a positive fuel_per_tank was used. Another minor problem: during refuelling if one of the tanks fills up in the current iteration, the extra fuel will not be distributed among the other tanks. As this function is called often and thus processes small amounts of fuel at a time, this does not really make a difference. (Plus the tanks will usually fill up at the same time.) Might be completely wrong, don't hesitate to kick me :) Greets, Csaba ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel