Skip to content

Commit

Permalink
Some cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
sago007 committed Sep 12, 2016
1 parent e53701a commit c15fb94
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions csg.cpp
Expand Up @@ -30,8 +30,8 @@ there will be no brush overlap after csg phase
*/

int minplanenums[3];
int maxplanenums[3];
static int minplanenums[3];
static int maxplanenums[3];

//===========================================================================
//
Expand Down
6 changes: 3 additions & 3 deletions l_bsp_ent.cpp
Expand Up @@ -145,9 +145,9 @@ void SetKeyValue (entity_t *ent, const char *key, const char *value)
ep->value = copystring(value);
}

const char *ValueForKey (entity_t *ent, const char *key)
const char *ValueForKey (const entity_t *ent, const char *key)
{
epair_t *ep;
const epair_t *ep;

for (ep=ent->epairs ; ep ; ep=ep->next)
if (!strcmp (ep->key, key) )
Expand All @@ -161,7 +161,7 @@ vec_t FloatForKey (entity_t *ent, const char *key)
return atof(k);
}

void GetVectorForKey (entity_t *ent, const char *key, vec3_t vec)
void GetVectorForKey (const entity_t *ent, const char *key, vec3_t vec)
{
const char *k;
double v1, v2, v3;
Expand Down
4 changes: 2 additions & 2 deletions l_bsp_ent.h
Expand Up @@ -55,9 +55,9 @@ extern entity_t entities[MAX_MAP_ENTITIES];

void StripTrailing(char *e);
void SetKeyValue(entity_t *ent, const char *key, const char *value);
const char *ValueForKey(entity_t *ent, const char *key); // will return "" if not present
const char *ValueForKey(const entity_t *ent, const char *key); // will return "" if not present
vec_t FloatForKey(entity_t *ent, const char *key);
void GetVectorForKey(entity_t *ent, const char *key, vec3_t vec);
void GetVectorForKey(const entity_t *ent, const char *key, vec3_t vec);
qboolean ParseEntity(script_t *script);
epair_t *ParseEpair(script_t *script);
void PrintEntity(entity_t *ent);
Expand Down
2 changes: 1 addition & 1 deletion l_qfiles.cpp
Expand Up @@ -41,7 +41,7 @@ typedef struct qfile_exttype_s
int type;
} qfile_exttyp_t;

qfile_exttyp_t quakefiletypes[] =
const qfile_exttyp_t quakefiletypes[] =
{
{QFILEEXT_UNKNOWN, QFILETYPE_UNKNOWN},
{QFILEEXT_PAK, QFILETYPE_PAK},
Expand Down
4 changes: 2 additions & 2 deletions leakfile.cpp
Expand Up @@ -41,12 +41,12 @@ that leads from the outside leaf to a specifically
occupied leaf
=============
*/
void LeakFile (tree_t *tree)
void LeakFile (const tree_t *tree)
{
vec3_t mid;
FILE *linefile;
char filename[1024];
node_t *node;
const node_t *node;
int count;

if (!tree->outside_node.occupied)
Expand Down
2 changes: 1 addition & 1 deletion map.cpp
Expand Up @@ -853,7 +853,7 @@ qboolean WriteOriginBrush(FILE *fp, vec3_t origin)
// Returns: -
// Changes Globals: -
//===========================================================================
mapbrush_t *GetAreaPortalBrush(const entity_t *mapent)
static mapbrush_t *GetAreaPortalBrush(const entity_t *mapent)
{
int portalnum, bn;
mapbrush_t *brush = NULL;
Expand Down
2 changes: 1 addition & 1 deletion qbsp.h
Expand Up @@ -453,7 +453,7 @@ void GLS_EndScene (void);
// leakfile.c
//=============================================================================

void LeakFile (tree_t *tree);
void LeakFile (const tree_t *tree);

//=============================================================================
// tree.c
Expand Down
4 changes: 2 additions & 2 deletions textures.cpp
Expand Up @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "qbsp.h"
#include "l_bsp_q2.h"

int nummiptex;
static int nummiptex;
textureref_t textureref[MAX_MAP_TEXTURES];

//===========================================================================
Expand Down Expand Up @@ -73,7 +73,7 @@ int FindMiptex (const char *name)
// Returns: -
// Changes Globals: -
//===========================================================================
vec3_t baseaxis[18] =
const vec3_t baseaxis[18] =
{
{0,0,1}, {1,0,0}, {0,-1,0}, // floor
{0,0,-1}, {1,0,0}, {0,-1,0}, // ceiling
Expand Down

0 comments on commit c15fb94

Please sign in to comment.