Add const qualifier to char * path argument in qoaplay_open() (#2972)
* Add const qualifier to char * path argument in qoa_open() * Remove unnecessary cast
This commit is contained in:
parent
03e19c7f43
commit
08670ecea1
2 changed files with 3 additions and 3 deletions
4
src/external/qoaplay.c
vendored
4
src/external/qoaplay.c
vendored
|
@ -62,7 +62,7 @@ typedef struct {
|
||||||
extern "C" { // Prevents name mangling of functions
|
extern "C" { // Prevents name mangling of functions
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
qoaplay_desc *qoaplay_open(char *path);
|
qoaplay_desc *qoaplay_open(const char *path);
|
||||||
qoaplay_desc *qoaplay_open_memory(const unsigned char *data, int data_size);
|
qoaplay_desc *qoaplay_open_memory(const unsigned char *data, int data_size);
|
||||||
void qoaplay_close(qoaplay_desc *qoa_ctx);
|
void qoaplay_close(qoaplay_desc *qoa_ctx);
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ int qoaplay_get_frame(qoaplay_desc *qoa_ctx);
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Open QOA file, keep FILE pointer to keep reading from file
|
// Open QOA file, keep FILE pointer to keep reading from file
|
||||||
qoaplay_desc *qoaplay_open(char *path)
|
qoaplay_desc *qoaplay_open(const char *path)
|
||||||
{
|
{
|
||||||
FILE *file = fopen(path, "rb");
|
FILE *file = fopen(path, "rb");
|
||||||
if (!file) return NULL;
|
if (!file) return NULL;
|
||||||
|
|
|
@ -1287,7 +1287,7 @@ Music LoadMusicStream(const char *fileName)
|
||||||
#if defined(SUPPORT_FILEFORMAT_QOA)
|
#if defined(SUPPORT_FILEFORMAT_QOA)
|
||||||
else if (IsFileExtension(fileName, ".qoa"))
|
else if (IsFileExtension(fileName, ".qoa"))
|
||||||
{
|
{
|
||||||
qoaplay_desc *ctxQoa = qoaplay_open((char *)fileName);
|
qoaplay_desc *ctxQoa = qoaplay_open(fileName);
|
||||||
music.ctxType = MUSIC_AUDIO_QOA;
|
music.ctxType = MUSIC_AUDIO_QOA;
|
||||||
music.ctxData = ctxQoa;
|
music.ctxData = ctxQoa;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue