]> git.mxchange.org Git - flightgear.git/commit
James Turner:
authorehofman <ehofman>
Sat, 13 Sep 2008 08:06:15 +0000 (08:06 +0000)
committerehofman <ehofman>
Sat, 13 Sep 2008 08:06:15 +0000 (08:06 +0000)
commitfe020badf0794eb4cca9df92685e9696655845f6
treeaa4ab81977e6be804aaedbbc8734cec46e919b45
parentbb2b03c7e392e107aeaf7dbc4eecc59064b28512
James Turner:
By way of example, here's a patch to make the position init code (in fg_init.cxx) cleaner, partly thanks to the FGPositioned changes. It reduces the file size by 200 lines - virtually all of which was copy-and-paste. Once the remaining class (FGAirport) is converted to inherit FGPositioned, all the future patches should be like this - touching one or a few files at most.

This factors the start-offset logic out into a helper, which also does the final property setting (which has to happen on both the /preset and 'real' values). Using the accessors in FGPositioned, and the offset helper, a couple of cases become trivial (fix and nav) and others become much simpler.
src/Main/fg_init.cxx