From d9e73cf19454bfe4764c39075f401baa81ce2363 Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Fri, 22 Feb 2013 16:03:41 +1030 Subject: [PATCH] qbsp: constify arguments to FaceSide() Signed-off-by: Kevin Shanahan --- qbsp/solidbsp.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/qbsp/solidbsp.c b/qbsp/solidbsp.c index 1f6972f2..1d3e2a17 100644 --- a/qbsp/solidbsp.c +++ b/qbsp/solidbsp.c @@ -40,12 +40,12 @@ For BSP hueristic ================== */ static int -FaceSide__(face_t *in, plane_t *split) +FaceSide__(const face_t *in, const plane_t *split) { bool frontcount, backcount; vec_t dot; int i; - vec_t *p; + const vec_t *p; frontcount = backcount = false; @@ -87,7 +87,7 @@ FaceSide__(face_t *in, plane_t *split) } static int -FaceSide(face_t *in, plane_t *split) +FaceSide(const face_t *in, const plane_t *split) { vec_t dist; int ret; @@ -291,12 +291,11 @@ The real BSP hueristic static surface_t * ChoosePlaneFromList(surface_t *surfaces, vec3_t mins, vec3_t maxs) { - int splits, minsplits; + int pass, splits, minsplits; surface_t *surf, *surf2, *bestsurface; - plane_t *plane, *plane2; vec_t distribution, bestdistribution; - face_t *face; - int pass; + const plane_t *plane, *plane2; + const face_t *face; /* pick the plane that splits the least */ minsplits = INT_MAX; @@ -431,7 +430,7 @@ void CalcSurfaceInfo(surface_t *surf) { int i, j; - face_t *f; + const face_t *f; // calculate a bounding box for (i = 0; i < 3; i++) {