qbsp: trivial constification of a few strings/args
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
a6280d8bd8
commit
cb59bfdc63
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
|
||||
char *
|
||||
copystring(char *s)
|
||||
copystring(const char *s)
|
||||
{
|
||||
char *b;
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ I_FloatTime(void)
|
|||
|
||||
|
||||
void
|
||||
DefaultExtension(char *path, char *extension)
|
||||
DefaultExtension(char *path, const char *extension)
|
||||
{
|
||||
char *src;
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ LoadFile
|
|||
==============
|
||||
*/
|
||||
size_t
|
||||
LoadFile(char *filename, void **buf, bool nofail)
|
||||
LoadFile(const char *filename, void **buf, bool nofail)
|
||||
{
|
||||
size_t len;
|
||||
FILE *f;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
|
||||
size_t LoadFile(char *filename, void **buf, bool nofail);
|
||||
size_t LoadFile(const char *filename, void **buf, bool nofail);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ vec3_t vec3_origin = { 0, 0, 0 };
|
|||
// util.c
|
||||
FILE *logfile;
|
||||
|
||||
char *rgszWarnings[cWarnings] = {
|
||||
const char *rgszWarnings[cWarnings] = {
|
||||
"No wad or _wad key exists in the worldmodel",
|
||||
"No valid WAD filenames in worldmodel",
|
||||
"Multiple info_player_start entities",
|
||||
|
|
@ -85,7 +85,7 @@ char *rgszWarnings[cWarnings] = {
|
|||
"line %d: Face with degenerate QuArK-style texture axes",
|
||||
};
|
||||
|
||||
char *rgszErrors[cErrors] = {
|
||||
const char *rgszErrors[cErrors] = {
|
||||
"No leak node in WriteLeakNode",
|
||||
"Unknown option '%s'",
|
||||
"line %d: Entity key or value too long",
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ PrintEntity(int iEntity)
|
|||
|
||||
|
||||
const char *
|
||||
ValueForKey(int iEntity, char *key)
|
||||
ValueForKey(int iEntity, const char *key)
|
||||
{
|
||||
epair_t *ep;
|
||||
|
||||
|
|
@ -640,7 +640,7 @@ ValueForKey(int iEntity, char *key)
|
|||
|
||||
|
||||
void
|
||||
SetKeyValue(int iEntity, char *key, char *value)
|
||||
SetKeyValue(int iEntity, const char *key, const char *value)
|
||||
{
|
||||
epair_t *ep;
|
||||
|
||||
|
|
@ -659,7 +659,7 @@ SetKeyValue(int iEntity, char *key, char *value)
|
|||
|
||||
|
||||
void
|
||||
GetVectorForKey(int iEntity, char *szKey, vec3_t vec)
|
||||
GetVectorForKey(int iEntity, const char *szKey, vec3_t vec)
|
||||
{
|
||||
const char *value;
|
||||
double v1, v2, v3;
|
||||
|
|
|
|||
14
qbsp/qbsp.h
14
qbsp/qbsp.h
|
|
@ -174,12 +174,12 @@ typedef unsigned char byte;
|
|||
|
||||
double I_FloatTime(void);
|
||||
|
||||
void DefaultExtension(char *path, char *extension);
|
||||
void DefaultExtension(char *path, const char *extension);
|
||||
void StripExtension(char *path);
|
||||
void StripFilename(char *path);
|
||||
int IsAbsolutePath(const char *path);
|
||||
|
||||
char *copystring(char *s);
|
||||
char *copystring(const char *s);
|
||||
|
||||
//===== mathlib.h
|
||||
|
||||
|
|
@ -634,9 +634,9 @@ void LoadMapFile(void);
|
|||
int FindMiptex(char *name);
|
||||
|
||||
void PrintEntity(int iEntity);
|
||||
const char *ValueForKey(int iEntity, char *key);
|
||||
void SetKeyValue(int iEntity, char *key, char *value);
|
||||
void GetVectorForKey(int iEntity, char *szKey, vec3_t vec);
|
||||
const char *ValueForKey(int iEntity, const char *key);
|
||||
void SetKeyValue(int iEntity, const char *key, const char *value);
|
||||
void GetVectorForKey(int iEntity, const char *szKey, vec3_t vec);
|
||||
|
||||
void WriteEntitiesToString(void);
|
||||
|
||||
|
|
@ -659,8 +659,8 @@ void ExportDrawNodes(mapentity_t *ent, node_t *headnode);
|
|||
#define msgScreen 6
|
||||
#define msgPercent 7
|
||||
|
||||
extern char *rgszWarnings[cWarnings];
|
||||
extern char *rgszErrors[cErrors];
|
||||
extern const char *rgszWarnings[cWarnings];
|
||||
extern const char *rgszErrors[cErrors];
|
||||
extern const int rgcMemSize[];
|
||||
|
||||
extern void *AllocMem(int Type, int cSize, bool fZero);
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ PrintMem
|
|||
void
|
||||
PrintMem(void)
|
||||
{
|
||||
char *rgszMemTypes[] = {
|
||||
const char *rgszMemTypes[] = {
|
||||
"BSPEntity", "BSPPlane", "BSPTex", "BSPVertex", "BSPVis", "BSPNode",
|
||||
"BSPTexinfo", "BSPFace", "BSPLight", "BSPClipnode", "BSPLeaf",
|
||||
"BSPMarksurface", "BSPEdge", "BSPSurfedge", "BSPModel", "Mapface",
|
||||
|
|
|
|||
Loading…
Reference in New Issue