mirror of
https://github.com/recp/cglm.git
synced 2026-01-06 07:04:07 +00:00
get memcpy type as param
This commit is contained in:
@@ -16,15 +16,15 @@
|
|||||||
# define CGLM_INLINE static inline __attribute((always_inline))
|
# define CGLM_INLINE static inline __attribute((always_inline))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define glm__memcpy(dest, src, size) \
|
#define glm__memcpy(type, dest, src, size) \
|
||||||
do { \
|
do { \
|
||||||
int32_t *srci; \
|
type *srci; \
|
||||||
int32_t *srci_end; \
|
type *srci_end; \
|
||||||
int32_t *desti; \
|
type *desti; \
|
||||||
\
|
\
|
||||||
srci = (int32_t *)src; \
|
srci = (type *)src; \
|
||||||
srci_end = (int32_t *)((char *)srci + size); \
|
srci_end = (type *)((char *)srci + size); \
|
||||||
desti = (int32_t *)dest; \
|
desti = (type *)dest; \
|
||||||
\
|
\
|
||||||
while (srci != srci_end) \
|
while (srci != srci_end) \
|
||||||
*desti++ = *srci++; \
|
*desti++ = *srci++; \
|
||||||
|
|||||||
Reference in New Issue
Block a user