wad: Make OpenFile parameter const

This commit is contained in:
Turo Lamminen 2018-07-21 16:39:09 +03:00
parent 663f9f92a5
commit a934b69f22
4 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@ typedef struct _wad_file_s wad_file_t;
typedef struct
{
// Open a file for reading.
wad_file_t *(*OpenFile)(char *path);
wad_file_t *(*OpenFile)(const char *path);
// Close the specified file.
void (*CloseFile)(wad_file_t *file);

View file

@ -74,7 +74,7 @@ unsigned int GetFileLength(int handle)
return lseek(handle, 0, SEEK_END);
}
static wad_file_t *W_POSIX_OpenFile(char *path)
static wad_file_t *W_POSIX_OpenFile(const char *path)
{
posix_wad_file_t *result;
int handle;

View file

@ -30,7 +30,7 @@ typedef struct
extern wad_file_class_t stdc_wad_file;
static wad_file_t *W_StdC_OpenFile(char *path)
static wad_file_t *W_StdC_OpenFile(const char *path)
{
stdc_wad_file_t *result;
FILE *fstream;

View file

@ -86,7 +86,7 @@ unsigned int GetFileLength(HANDLE handle)
return result;
}
static wad_file_t *W_Win32_OpenFile(char *path)
static wad_file_t *W_Win32_OpenFile(const char *path)
{
win32_wad_file_t *result;
wchar_t wpath[MAX_PATH + 1];