Skip to content

Remove memcpy - #79

Merged
SpartanJ merged 4 commits into
SpartanJ:masterfrom
stijnherfst:remove-memcpy
Apr 26, 2026
Merged

SpartanJ merged 4 commits into
SpartanJ:masterfrom
stijnherfst:remove-memcpy

Conversation

@stijnherfst

@stijnherfst stijnherfst commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

I removed a memcpy when directly uploading compressed textures using SOIL_direct_load_DDS_from_memory and also reworked the function somewhat to simplify the logic.

Furthermore, SOIL_free_image_data can be removed as free() is already a no-op for nullptr.

And lastly I added the new header file to the CMake install list as that was breaking vcpkg builds.

@SpartanJ

Copy link
Copy Markdown
Owner

Hi @stijnherfst, thanks for the collaboration!

Everything looks good, my only "concern" is the stylistic change for the variable order declaration, this was to preserve the C89 support intact (although my most recent changes also break this accidentally, but it's trivial to fix). I really do not personally care, but the reasoning was to follow stb conventions, which SOIL mostly relies on. I don't think many people value C99 support at all these days, but give me a day to think about it, thanks!

@SpartanJ
SpartanJ merged commit ed4a595 into SpartanJ:master Apr 26, 2026
3 checks passed
@SpartanJ

Copy link
Copy Markdown
Owner

Thanks!

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