URL:
  <http://gna.org/patch/?7149>

                 Summary: city_unit_unhappiness() to check
EFT_MAKE_CONTENT_MIL_PER only when needed
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Mon 25 Apr 2016 03:01:26 AM EEST
                Category: general
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.5.4, 2.6.0, 3.0.0

    _______________________________________________________

Details:

Currently city_unit_unhappiness() gets value of EFT_MAKE_CONTENT_MIL_PER -
potentially expensive thing to get - before some checks for early-exit. The
value is ever needed only after those early-exit points.
Attached patch moves effect value call to a point where we already know that
it will be needed. Other calls the function does are likewise moved, but I
don't think any of the others are significant performance-wise.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 25 Apr 2016 03:01:26 AM EEST  Name: UnitUnhappinessEffectAvoid.patch
 Size: 2kB   By: cazfi

<http://gna.org/patch/download.php?file_id=27201>
-------------------------------------------------------
Date: Mon 25 Apr 2016 03:01:26 AM EEST  Name:
UnitUnhappinessEffectAvoid-S2_5.patch  Size: 2kB   By: cazfi

<http://gna.org/patch/download.php?file_id=27202>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?7149>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to