You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My suggestion is to use std::vector instead of VLA. The performance should be unaffected since that function is doing a file write, which would take significantly more time compared to a heap allocation.
I've written the patch, and verified that this project does compile with that change (although without zlib. I simply didn't test them).
I can submit a PR as long as you're okay with this change.
I haven't bothered merging it yet as there's still some nits needing to be resolved, and there's not much point in supporting MSVC specifically when clang-cl exists (so it's rather low priority).
Overview
There is a single use of variable length array in this project. MSVC won't support it, so the project fails to compile.
In function
bool StateSaver::saveState(...)
:gambatte-core/libgambatte/src/statesaver.cpp
Line 555 in 9ec48e8
Change Proposal
My suggestion is to use
std::vector
instead of VLA. The performance should be unaffected since that function is doing a file write, which would take significantly more time compared to a heap allocation.I've written the patch, and verified that this project does compile with that change (although without zlib. I simply didn't test them).
I can submit a PR as long as you're okay with this change.
Resources
A Link to the
PastPatch: https://github.com/jsonmona/gambatte-core/blob/2011b9981df76e02619e32e8c5249115c3f97f32/libgambatte/src/statesaver.cpp#L555The text was updated successfully, but these errors were encountered: