ISO C++ forbids converting a string constant to char* (#26)

This commit is contained in:
k3tamina 2022-06-02 10:44:12 +02:00 committed by GitHub
parent 571c0db190
commit 2e7070a942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -354,7 +354,7 @@ void _setMixTableColor(int a1)
} }
// 0x4C78E4 // 0x4C78E4
bool colorPaletteLoad(char* path) bool colorPaletteLoad(const char* path)
{ {
if (gColorFileNameMangler != NULL) { if (gColorFileNameMangler != NULL) {
path = gColorFileNameMangler(path); path = gColorFileNameMangler(path);

View File

@ -5,7 +5,7 @@
#include <stdlib.h> #include <stdlib.h>
typedef char*(ColorFileNameManger)(char*); typedef const char*(ColorFileNameManger)(const char*);
typedef void(ColorTransitionCallback)(); typedef void(ColorTransitionCallback)();
typedef int(ColorPaletteFileOpenProc)(const char* path, int mode); typedef int(ColorPaletteFileOpenProc)(const char* path, int mode);
@ -54,7 +54,7 @@ void _setSystemPaletteEntries(unsigned char* a1, int a2, int a3);
void _setIntensityTableColor(int a1); void _setIntensityTableColor(int a1);
void _setIntensityTables(); void _setIntensityTables();
void _setMixTableColor(int a1); void _setMixTableColor(int a1);
bool colorPaletteLoad(char* path); bool colorPaletteLoad(const char* path);
char* _colorError(); char* _colorError();
void _buildBlendTable(unsigned char* ptr, unsigned char ch); void _buildBlendTable(unsigned char* ptr, unsigned char ch);
void _rebuildColorBlendTables(); void _rebuildColorBlendTables();

View File

@ -46,7 +46,7 @@ const char* gMovieFileNames[MOVIE_COUNT] = {
}; };
// 0x518DE4 // 0x518DE4
char* gMoviePaletteFilePaths[MOVIE_COUNT] = { const char* gMoviePaletteFilePaths[MOVIE_COUNT] = {
NULL, NULL,
"art\\cuts\\introsub.pal", "art\\cuts\\introsub.pal",
"art\\cuts\\eldersub.pal", "art\\cuts\\eldersub.pal",
@ -209,7 +209,7 @@ int gameMoviePlay(int movie, int flags)
int oldTextColor; int oldTextColor;
int oldFont; int oldFont;
if (subtitlesEnabled) { if (subtitlesEnabled) {
char* subtitlesPaletteFilePath; const char* subtitlesPaletteFilePath;
if (gMoviePaletteFilePaths[movie] != NULL) { if (gMoviePaletteFilePaths[movie] != NULL) {
subtitlesPaletteFilePath = gMoviePaletteFilePaths[movie]; subtitlesPaletteFilePath = gMoviePaletteFilePaths[movie];
} else { } else {

View File

@ -35,7 +35,7 @@ typedef enum GameMovie {
extern const float flt_50352A; extern const float flt_50352A;
extern const char* gMovieFileNames[MOVIE_COUNT]; extern const char* gMovieFileNames[MOVIE_COUNT];
extern char* gMoviePaletteFilePaths[MOVIE_COUNT]; extern const char* gMoviePaletteFilePaths[MOVIE_COUNT];
extern bool gGameMovieIsPlaying; extern bool gGameMovieIsPlaying;
extern bool gGameMovieFaded; extern bool gGameMovieFaded;