silence clang -Wcast-qual const drop warnings

This commit is contained in:
Viktor Szakats 2017-03-30 00:12:53 +00:00
parent 92fcd25e9d
commit dce241c107

View File

@ -466,7 +466,14 @@
static_cast<type>(static_cast<const void*>(value)) static_cast<type>(static_cast<const void*>(value))
#else #else
# define png_voidcast(type, value) (value) # define png_voidcast(type, value) (value)
# define png_constcast(type, value) ((type)(value)) # if defined( _WIN64 ) && ! defined( __GNUC__ )
typedef unsigned __int64 png_ptruint;
# elif defined( _WIN64 )
typedef unsigned long long png_ptruint;
# else
typedef unsigned long png_ptruint;
# endif
# define png_constcast(type, value) ((type)(png_ptruint)(const void*)(value))
# define png_aligncast(type, value) ((void*)(value)) # define png_aligncast(type, value) ((void*)(value))
# define png_aligncastconst(type, value) ((const void*)(value)) # define png_aligncastconst(type, value) ((const void*)(value))
#endif /* __cplusplus */ #endif /* __cplusplus */