[Freeciv-tickets] [freeciv] #48211: give_shared_vision() tripled map_get_own_seen() call

アーカイブの一覧に戻る
OSDN Ticket System norep****@osdn*****
Mon Sep 25 08:01:19 JST 2023


#48211: give_shared_vision() tripled map_get_own_seen() call

  Open Date: 2023-06-10 06:06
Last Update: 2023-09-25 02:01

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/48211
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48211

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2023-09-25 02:01 Updated by: cazfi
 * Resolution Update from None to Accepted

Comment:

Reply To cazfi
clang:
{{{
../../../src/server/maphand.c:1137:19: error: unused function 'map_get_own_seen' -Werror,-Wunused-function
static inline int map_get_own_seen(const struct player *pplayer,
}}}
Fixed in attached version

---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: cazfi
          Type: Bugs
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: 3.1.0-beta4
     Component: Server
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

Ticket details:

give_shared_vision() has
              V_RADIUS(map_get_own_seen(pplayer, ptile, V_MAIN),
                       map_get_own_seen(pplayer, ptile, V_INVIS),
                       map_get_own_seen(pplayer, ptile, V_SUBSURFACE));
That is, exactly same vision base is calculated three times. We recently fixed similar case in unittools.c, so functions supporting optimization already exist.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/48211
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48211



More information about the Freeciv-tickets mailing list
アーカイブの一覧に戻る