(ef_zapcache): Clearing the cache doesn't make sense. No harm done if
the next user can't use the cache, it gets automatically zapped then. Remove.
This commit is contained in:
parent
ecab7c4f2f
commit
12b1427693
4 changed files with 0 additions and 24 deletions
|
@ -141,7 +141,6 @@ extern int ef_flush(int);
|
||||||
extern int ef_write(int, int, void *);
|
extern int ef_write(int, int, void *);
|
||||||
extern int ef_extend(int, int);
|
extern int ef_extend(int, int);
|
||||||
extern int ef_ensure_space(int, int, int);
|
extern int ef_ensure_space(int, int, int);
|
||||||
extern void ef_zapcache(int);
|
|
||||||
extern int ef_nelem(int);
|
extern int ef_nelem(int);
|
||||||
extern int ef_flags(int);
|
extern int ef_flags(int);
|
||||||
extern int ef_byname(char *);
|
extern int ef_byname(char *);
|
||||||
|
|
|
@ -376,19 +376,6 @@ ef_extend(int type, int count)
|
||||||
return i == count;
|
return i == count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Mark the cache for the file containing objects of type 'type' as unused.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
ef_zapcache(int type)
|
|
||||||
{
|
|
||||||
struct empfile *ep = &empfile[type];
|
|
||||||
if ((ep->flags & EFF_MEM) == 0) {
|
|
||||||
ep->cids = 0;
|
|
||||||
ep->baseid = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct castr *
|
struct castr *
|
||||||
ef_cadef(int type)
|
ef_cadef(int type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,7 +134,6 @@ snxtitem_area(struct nstr_item *np, int type, struct range *range)
|
||||||
np->read = ef_read;
|
np->read = ef_read;
|
||||||
np->flags = ef_flags(type);
|
np->flags = ef_flags(type);
|
||||||
xysize_range(&np->range);
|
xysize_range(&np->range);
|
||||||
ef_zapcache(type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -160,7 +159,6 @@ snxtitem_dist(struct nstr_item *np, int type, int cx, int cy,
|
||||||
/* It did the wrong thing for small, hitech worlds. */
|
/* It did the wrong thing for small, hitech worlds. */
|
||||||
xysize_range(&np->range);
|
xysize_range(&np->range);
|
||||||
#endif
|
#endif
|
||||||
ef_zapcache(type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -176,7 +174,6 @@ snxtitem_xy(struct nstr_item *np, int type, coord x, coord y)
|
||||||
np->dist = 0;
|
np->dist = 0;
|
||||||
np->read = ef_read;
|
np->read = ef_read;
|
||||||
np->flags = ef_flags(type);
|
np->flags = ef_flags(type);
|
||||||
ef_zapcache(type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -190,7 +187,6 @@ snxtitem_all(struct nstr_item *np, int type)
|
||||||
np->read = ef_read;
|
np->read = ef_read;
|
||||||
np->flags = ef_flags(type);
|
np->flags = ef_flags(type);
|
||||||
xysize_range(&np->range);
|
xysize_range(&np->range);
|
||||||
ef_zapcache(type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -207,7 +203,6 @@ snxtitem_group(struct nstr_item *np, int type, s_char group)
|
||||||
np->read = ef_read;
|
np->read = ef_read;
|
||||||
np->flags = ef_flags(type);
|
np->flags = ef_flags(type);
|
||||||
xysize_range(&np->range);
|
xysize_range(&np->range);
|
||||||
ef_zapcache(type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -215,7 +210,6 @@ snxtitem_rewind(struct nstr_item *np)
|
||||||
{
|
{
|
||||||
np->cur = -1;
|
np->cur = -1;
|
||||||
np->index = -1;
|
np->index = -1;
|
||||||
ef_zapcache(np->type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -235,6 +229,5 @@ snxtitem_list(struct nstr_item *np, int type, int *list, int len)
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
np->list[i] = list[i];
|
np->list[i] = list[i];
|
||||||
np->size = len;
|
np->size = len;
|
||||||
ef_zapcache(type);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,6 @@ snxtsct_area(struct nstr_sect *np, struct range *range)
|
||||||
np->dx = -1;
|
np->dx = -1;
|
||||||
np->dy = 0;
|
np->dy = 0;
|
||||||
xysize_range(&np->range);
|
xysize_range(&np->range);
|
||||||
ef_zapcache(EF_SECTOR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -126,7 +125,6 @@ snxtsct_rewind(struct nstr_sect *np)
|
||||||
np->dx = -1;
|
np->dx = -1;
|
||||||
np->dy = 0;
|
np->dy = 0;
|
||||||
np->id = -1;
|
np->id = -1;
|
||||||
ef_zapcache(EF_SECTOR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -149,7 +147,6 @@ snxtsct_dist(struct nstr_sect *np, coord cx, coord cy, int dist)
|
||||||
/* It was not doing the right thing when the world was small */
|
/* It was not doing the right thing when the world was small */
|
||||||
xysize_range(&np->range);
|
xysize_range(&np->range);
|
||||||
#endif
|
#endif
|
||||||
ef_zapcache(EF_SECTOR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue