diff options
| author | sschirm <[email protected]> | 2016-12-23 14:20:36 +0100 |
|---|---|---|
| committer | sschirm <[email protected]> | 2016-12-23 14:56:17 +0100 |
| commit | ef6937e69e8ee3f409cf9d460d5ad300a65d5924 (patch) | |
| tree | 710426e8daa605551ce3f34b581897011101c30f /PxShared/src/fastxml | |
| parent | Initial commit: (diff) | |
| download | physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.tar.xz physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.zip | |
PhysX 3.4 / APEX 1.4 release candidate @21506124
Diffstat (limited to 'PxShared/src/fastxml')
| -rw-r--r-- | PxShared/src/fastxml/src/PsFastXml.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/PxShared/src/fastxml/src/PsFastXml.cpp b/PxShared/src/fastxml/src/PsFastXml.cpp index 5969d2a9..3e95016f 100644 --- a/PxShared/src/fastxml/src/PsFastXml.cpp +++ b/PxShared/src/fastxml/src/PsFastXml.cpp @@ -28,6 +28,7 @@ // Copyright (c) 2001-2004 NovodeX AG. All rights reserved. #include "foundation/PxAssert.h" +#include "foundation/PxMemory.h" #include "Ps.h" #include "PsFastXml.h" #include <stdio.h> @@ -35,6 +36,8 @@ #include <new> #include <ctype.h> +using namespace physx; + namespace { #define MIN_CLOSE_COUNT 2 @@ -359,7 +362,7 @@ class MyFastXml : public physx::shdfnd::FastXml { uint32_t tlen = uint32_t(strlen(text)); mStack[i] = static_cast<const char*>(mCallback->allocate(tlen + 1)); - memcpy(const_cast<void*>(static_cast<const void*>(mStack[i])), text, tlen + 1); + PxMemCopy(const_cast<void*>(static_cast<const void*>(mStack[i])), text, tlen + 1); mStackAllocated[i] = true; } } @@ -423,7 +426,7 @@ class MyFastXml : public physx::shdfnd::FastXml mReadBufferSize = mReadBufferSize * 2; char* oldReadBuffer = mReadBuffer; mReadBuffer = static_cast<char*>(mCallback->allocate(mReadBufferSize + 1)); - memcpy(mReadBuffer, oldReadBuffer, oldSize); + PxMemCopy(mReadBuffer, oldReadBuffer, oldSize); mCallback->deallocate(oldReadBuffer); offset = oldSize; uint32_t readSize = mReadBufferSize - oldSize; |