Replace all SDL_RWFromMem() with SDL_RWFromConstMem()

Since we're not going to be writing to any of these RWops, we might as
well just ensure that we don't by using SDL_RWFromConstMem().
This commit is contained in:
Misa
2021-02-22 20:21:12 -08:00
committed by Ethan Lee
parent 4a8c0a38ee
commit 3171a97160
2 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ SoundTrack::SoundTrack(const char* fileName)
fprintf(stderr, "Unable to load WAV file %s\n", fileName);
return;
}
SDL_RWops *fileIn = SDL_RWFromMem(mem, length);
SDL_RWops *fileIn = SDL_RWFromConstMem(mem, length);
sound = Mix_LoadWAV_RW(fileIn, 1);
FILESYSTEM_freeMemory(&mem);