Skip to content

Conversation

@DeeJayLSP
Copy link
Contributor

@DeeJayLSP DeeJayLSP commented Sep 9, 2023

Fixes a few errors that can be bypassed with -fpermissive in C++ projects. Does not affect C.

@DeeJayLSP DeeJayLSP changed the title Add type casts to MALLOC calls and reformat Add type casts to MALLOC calls Sep 29, 2023
@DeeJayLSP
Copy link
Contributor Author

DeeJayLSP commented Sep 29, 2023

Rebased so it sticks to a single change.

@samhocevar
Copy link

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?

@samhocevar
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants