mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 06:34:11 +00:00
Make the default map size smaller.
256 is pretty big. Now, set_t is always 32 bytes, giving 64 members for 64 bit machines and (probably) 128 members for 32 bit machines.
This commit is contained in:
parent
39920a4ea7
commit
dbcf8f3774
1 changed files with 10 additions and 5 deletions
|
@ -36,6 +36,11 @@
|
|||
*/
|
||||
//@{
|
||||
|
||||
#define DEFMAP_SIZE ((32 - sizeof (struct set_s *) \
|
||||
- sizeof (unsigned *) \
|
||||
- sizeof (int) - sizeof (unsigned))\
|
||||
/ sizeof (unsigned))
|
||||
|
||||
/** Represent a set using a bitmap.
|
||||
|
||||
When \a inverted is zero, ones in the bitmap represent members, but when
|
||||
|
@ -45,10 +50,10 @@
|
|||
*/
|
||||
typedef struct set_s {
|
||||
struct set_s *next; ///< private. for ALLOC
|
||||
int inverted; ///< if true, 0 indicates membership
|
||||
unsigned *map; ///< bitmap of set members
|
||||
int inverted; ///< if true, 0 indicates membership
|
||||
unsigned size; ///< number of representable members
|
||||
unsigned defmap[8]; ///< backing store for small sets
|
||||
unsigned defmap[DEFMAP_SIZE];///< backing store for small sets
|
||||
} set_t;
|
||||
|
||||
/** Represent the state of a scan through a set.
|
||||
|
|
Loading…
Reference in a new issue