memononen / nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
zlib License
5.06k stars 767 forks source link

Make data argument for nvgCreate*Mem() be pointer to const. #615

Closed AlbertoGP closed 3 years ago

AlbertoGP commented 3 years ago

This avoids compiler warnings when the source data is const.

The first change in line 32, removing the trailing space, is a stowaway but I think it’s not worth putting in a different commit. I’ll remove that if asked to. Any other changes, please let me know.

AlbertoGP commented 3 years ago

Ah, no, this just moves the warning upstream. It must not be const in the case when the library frees the data.