qbsp: constify arguments to FaceSide()

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2013-02-22 16:03:41 +10:30
parent da3aa26ee5
commit d9e73cf194
1 changed files with 7 additions and 8 deletions

View File

@ -40,12 +40,12 @@ For BSP hueristic
================== ==================
*/ */
static int static int
FaceSide__(face_t *in, plane_t *split) FaceSide__(const face_t *in, const plane_t *split)
{ {
bool frontcount, backcount; bool frontcount, backcount;
vec_t dot; vec_t dot;
int i; int i;
vec_t *p; const vec_t *p;
frontcount = backcount = false; frontcount = backcount = false;
@ -87,7 +87,7 @@ FaceSide__(face_t *in, plane_t *split)
} }
static int static int
FaceSide(face_t *in, plane_t *split) FaceSide(const face_t *in, const plane_t *split)
{ {
vec_t dist; vec_t dist;
int ret; int ret;
@ -291,12 +291,11 @@ The real BSP hueristic
static surface_t * static surface_t *
ChoosePlaneFromList(surface_t *surfaces, vec3_t mins, vec3_t maxs) ChoosePlaneFromList(surface_t *surfaces, vec3_t mins, vec3_t maxs)
{ {
int splits, minsplits; int pass, splits, minsplits;
surface_t *surf, *surf2, *bestsurface; surface_t *surf, *surf2, *bestsurface;
plane_t *plane, *plane2;
vec_t distribution, bestdistribution; vec_t distribution, bestdistribution;
face_t *face; const plane_t *plane, *plane2;
int pass; const face_t *face;
/* pick the plane that splits the least */ /* pick the plane that splits the least */
minsplits = INT_MAX; minsplits = INT_MAX;
@ -431,7 +430,7 @@ void
CalcSurfaceInfo(surface_t *surf) CalcSurfaceInfo(surface_t *surf)
{ {
int i, j; int i, j;
face_t *f; const face_t *f;
// calculate a bounding box // calculate a bounding box
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {