mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 09:51:41 +00:00
Make R_StoreEfrags const-correct.
R_StoreEfrags does not need to modify its parameter or anything to which it directly refers, so make the pointer single-level and constant.
This commit is contained in:
parent
79796c1b16
commit
f98b002f9e
5 changed files with 9 additions and 16 deletions
|
@ -310,7 +310,7 @@ extern int r_numvisedicts;
|
|||
extern struct entity_s *r_visedicts[];
|
||||
struct dlight_s;
|
||||
|
||||
void R_StoreEfrags (efrag_t **ppefrag);
|
||||
void R_StoreEfrags (const efrag_t *ppefrag);
|
||||
void R_TimeRefresh_f (void);
|
||||
void R_TimeGraph (void);
|
||||
void R_ZGraph (void);
|
||||
|
|
|
@ -564,7 +564,7 @@ visit_leaf (mleaf_t *leaf)
|
|||
{
|
||||
// deal with model fragments in this leaf
|
||||
if (leaf->efrags)
|
||||
R_StoreEfrags (&leaf->efrags);
|
||||
R_StoreEfrags (leaf->efrags);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
|
|
@ -215,20 +215,13 @@ R_AddEfrags (entity_t *ent)
|
|||
ent->topnode = r_pefragtopnode;
|
||||
}
|
||||
|
||||
/*
|
||||
R_StoreEfrags
|
||||
|
||||
FIXME: a lot of this goes away with edge-based
|
||||
*/
|
||||
void
|
||||
R_StoreEfrags (efrag_t **ppefrag)
|
||||
R_StoreEfrags (const efrag_t *pefrag)
|
||||
{
|
||||
entity_t *pent;
|
||||
model_t *model;
|
||||
efrag_t *pefrag;
|
||||
|
||||
|
||||
while ((pefrag = *ppefrag) != NULL) {
|
||||
while (pefrag) {
|
||||
pent = pefrag->entity;
|
||||
model = pent->model;
|
||||
|
||||
|
@ -248,7 +241,7 @@ R_StoreEfrags (efrag_t **ppefrag)
|
|||
pent->visframe = r_framecount;
|
||||
}
|
||||
|
||||
ppefrag = &pefrag->leafnext;
|
||||
pefrag = pefrag->leafnext;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -400,7 +400,7 @@ visit_leaf (mleaf_t *leaf)
|
|||
{
|
||||
// deal with model fragments in this leaf
|
||||
if (leaf->efrags)
|
||||
R_StoreEfrags (&leaf->efrags);
|
||||
R_StoreEfrags (leaf->efrags);
|
||||
leaf->key = r_currentkey;
|
||||
r_currentkey++; // all bmodels in a leaf share the same key
|
||||
}
|
||||
|
@ -611,7 +611,7 @@ R_RecursiveWorldNode (mnode_t *node, int clipflags)
|
|||
pleaf = (mleaf_t *) node;
|
||||
// deal with model fragments in this leaf
|
||||
if (pleaf->efrags) {
|
||||
R_StoreEfrags (&pleaf->efrags);
|
||||
R_StoreEfrags (pleaf->efrags);
|
||||
}
|
||||
|
||||
pleaf->key = r_currentkey;
|
||||
|
|
|
@ -400,7 +400,7 @@ visit_leaf (mleaf_t *leaf)
|
|||
{
|
||||
// deal with model fragments in this leaf
|
||||
if (leaf->efrags)
|
||||
R_StoreEfrags (&leaf->efrags);
|
||||
R_StoreEfrags (leaf->efrags);
|
||||
leaf->key = r_currentkey;
|
||||
r_currentkey++; // all bmodels in a leaf share the same key
|
||||
}
|
||||
|
@ -611,7 +611,7 @@ R_RecursiveWorldNode (mnode_t *node, int clipflags)
|
|||
pleaf = (mleaf_t *) node;
|
||||
// deal with model fragments in this leaf
|
||||
if (pleaf->efrags) {
|
||||
R_StoreEfrags (&pleaf->efrags);
|
||||
R_StoreEfrags (pleaf->efrags);
|
||||
}
|
||||
|
||||
pleaf->key = r_currentkey;
|
||||
|
|
Loading…
Reference in a new issue