Fix const cast issue for 'void *' pointer.
This commit is contained in:
1 parent
aba1ac1646
commit
984b8e7da0
1 file changed
+1
-1
@@ -1335,7 +1335,7 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
# define M_CONST_CAST(type, n) \
|
# define M_CONST_CAST(type, n) \
|
||||||
(((union { type *ptr; const type *cptr; }){n}).cptr)
|
(((union { type *ptr; type const *cptr; }){n}).cptr)
|
||||||
#else
|
#else
|
||||||
# define M_CONST_CAST(type, n) const_cast<const type*>(n)
|
# define M_CONST_CAST(type, n) const_cast<const type*>(n)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user