qoa
qoa copied to clipboard
Add type casts to MALLOC calls
Fixes a few errors that can be bypassed with -fpermissive in C++ projects. Does not affect C.
Rebased so it sticks to a single change.
I can confirm this patch works (tested on Windows, Xbox, PlayStation, and Switch platforms) and is useful. Makes it possible to embed QOA in a C++ project, because extern "C" is not enough and will not work. Could it be applied, please?
FYI, for the time being, our workaround is to compile the QOA implementation as C even if the project is C++, so we have this single qoa-impl.c file that contains only this:
#define QOA_IMPLEMENTATION
#include "../3rdparty/qoa/qoa.h"