Make memcpy smaller. We don't need the speed :)

This commit is contained in:
Stefan `Sec` Zehl 2012-01-27 22:42:56 +01:00
parent e8eb8402d0
commit 163429f035
1 changed files with 5 additions and 0 deletions

View File

@ -52,6 +52,7 @@ void * memcpy(void *pDestination, const void *pSource, size_t num)
{
unsigned char *pByteDestination;
unsigned char *pByteSource;
#ifdef FAST_MEMCPY
unsigned int *pAlignedSource = (unsigned int *) pSource;
unsigned int *pAlignedDestination = (unsigned int *) pDestination;
@ -71,6 +72,10 @@ void * memcpy(void *pDestination, const void *pSource, size_t num)
// Copy remaining bytes
pByteDestination = (unsigned char *) pAlignedDestination;
pByteSource = (unsigned char *) pAlignedSource;
#else
pByteDestination = (unsigned char *) pDestination;
pByteSource = (unsigned char *) pSource;
#endif
while (num--) {
*pByteDestination++ = *pByteSource++;