News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

Restore integer overflow check to karte_t::step

Started by neroden, June 04, 2024, 02:54:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

neroden

This is on the (misnamed) sync-cleanups branch.  This resynchronizes with Standard.  There was no reason to remove the integer overflow check; overflow checks are good; they are cheap computationally.  We may at some point have large ticks_per_month values and very long games and may risk overflowing sint64; there is no harm in leaving a check in place and potential harm in commenting it out.

jamespetts

Quote from: neroden on June 04, 2024, 02:54:21 PMThis is on the (misnamed) sync-cleanups branch.  This resynchronizes with Standard.  There was no reason to remove the integer overflow check; overflow checks are good; they are cheap computationally.  We may at some point have large ticks_per_month values and very long games and may risk overflowing sint64; there is no harm in leaving a check in place and potential harm in commenting it out.
Thank you - now incorporated.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.