Remove dup DE_CONST #define

This commit is contained in:
Ondřej Surý
2019-04-17 14:39:41 +02:00
parent be20379cd7
commit 78c505b4ce
-15
View File
@@ -202,19 +202,4 @@
(r).rend = (r).rstart + strlen(s); \
} while (0)
/*%
* Use this to remove the const qualifier of a variable to assign it to
* a non-const variable or pass it as a non-const function argument ...
* but only when you are sure it won't then be changed!
* This is necessary to sometimes shut up some compilers
* (as with gcc -Wcast-qual) when there is just no other good way to avoid the
* situation.
*/
#define DE_CONST(konst,var) \
do { \
union { const void* k; void*v; } _u; \
_u.k = konst; \
var = _u.v; \
} while (0)
#endif /* ISCCC_UTIL_H */