Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12944) bv_id must die
Home

[Freeciv-Dev] (PR#12944) bv_id must die

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12944) bv_id must die
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 30 Apr 2005 12:37:42 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12944 >


/* max size of a short */
#define MAX_NUM_ID 32767

BV_DEFINE(bv_id, MAX_NUM_ID);

    bv_id diplomat_reservations;

This has two problems.

1.  It is insanely inefficient.  Right now there's one per player, which
is only a wasted 32k of memory.  But people might be tempted to use it
in future.

2.  It will fail if MAX_NUM_ID is exceeded.  Which it can be (in fact
it's guaranteed for some inputs).

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12944) bv_id must die, Jason Short <=