I think entire get_stocklevel stuff can be simplified.
You just need to iterate over all production_hints (iterating over empty vector 
will not hurt), then iterate over all output (the same)
And now there is a question - can we apply get_stocklevel to a site that is 
neither supporting nor producing? We can put there as assert to make sure that 
stocklevel for at least one ware was calculated.... (f.e. it is not still 
std::max)
-- 
https://code.launchpad.net/~widelands-dev/widelands/frisian_balancing_with_ai_hints/+merge/347166
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/frisian_balancing_with_ai_hints into lp:widelands.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to