I think it is much better this way.
When I firstly saw line:
Cost += InlineConstants::LastCallToStaticBonus;
I though that this is a bug, because everywhere where the cost is being reduced
it is usuing -=.
Differential D23222
Chang sign of LastCallToStaticBouns Prazek on Aug 5 2016, 1:23 PM. Authored by
Details I think it is much better this way. Cost += InlineConstants::LastCallToStaticBonus; I though that this is a bug, because everywhere where the cost is being reduced
Diff Detail
Event Timeline
Comment Actions I don't think it is inconsistent.
Comment Actions So IMHO it is better to express increase of cost by add and decrease by substract, than mixing both.
Comment Actions I'm not totally convinced, but if someone else thinks it is a good idea I won't oppose either. Comment Actions I agree with Piotr - to me it seems more intuitive to subtract a bonus from the "Cost" and to add the penalty. I have to admit I had the same confusion the first time I looked at this code, until I discovered that the Bonus was negative. |