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
Are there parts of this something you might be able to contribute behind some #if defined(WIN32) macro guards?
Why do you have to comment-out log2, btw? Is that name a windows-only thing or is it hitting some other compile error?
For the unsigned char** ptrs = new unsigned char*[height]; change -- that's a memory leak. I'd recommend storing it in a std::unique_ptr<unsigned char> instead so that it avoids the leak.
It is true that the current use of const unsigned char* ptrs[height]; is a GCC extension ("variable-length arrays"), so replacing that would be worth it IMO.
Hi,
In order to compile on windows with Visual studio 2022, I needed to:
from
inline double log2(double x) { return log(x) * 1.4426950408889634; }
to
//inline double log2(double x) { return log(x) * 1.4426950408889634; }
from
const unsigned char* ptrs[height];
to
unsigned char** ptrs = new unsigned char*[height];
from
const unsigned char* ptrs[height];
to
unsigned char** ptrs = new unsigned char*[height];
These changes should not impact other platform.
Pierre
The text was updated successfully, but these errors were encountered: