FS#1149 - [Patch] removing most of the >> as / related to Money values

Attached to Project: OpenTTD
Opened by Noldo (Noldo) - Wednesday, 22 August 2007, 04:27 GMT
Type Patch
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


As a side product of trying to make Money into class I ran into ">> 4" and similar ones applied to values of type Money. I feel that these should be changed to use / because it's more natural way for a human to read and also having a bit shift operator on a class that is an abstraction of money later doesn't seem to fit.
This task depends upon

Closed by  Patric Stout (TrueBrain)
Saturday, 03 November 2007, 23:19 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Patch rejected. Currently no real gain.
Comment by Noldo (Noldo) - Wednesday, 22 August 2007, 05:42 GMT
Updated a bit after comments from peter1138.
Also fixed few things caused by overeagerness to remove bitshifts.
Comment by Noldo (Noldo) - Wednesday, 22 August 2007, 05:45 GMT
Lynx is not my friend.
Comment by Noldo (Noldo) - Friday, 24 August 2007, 19:57 GMT
Now with correct number of spaces.
Comment by Noldo (Noldo) - Friday, 31 August 2007, 17:03 GMT
Unified vehicle gui required a reaction.
Comment by Patric Stout (TrueBrain) - Saturday, 03 November 2007, 23:18 GMT
Although the patch in fact looks nice, I don't see the usage of converting all the >> to /. It only tempt people to use non-power-of-two values, which will cause big slowdowns. For that reason, this patch is rejected for now. Who knows it will ever be applied, but currently there is no real gain, only a step back.