> return forester_cache[mi] = correct_val;
< forester_cache[mi] = correct_val;"
< return correct_val;

Well any compiler with some omptimization should optimize this away.
Maybe som bad habit from the old days of C programming :-)


> The comparison (cache_entry > kInvalidForesterEntry) looks weird. 

Yes I thought about this, too. It its more robust, in case one of the
calculactions later returns some negative value this might fix it?

Feel freee to change these aspects as you wish.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1574379-forester-wit/+merge/336068
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1574379-forester-wit.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to