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/pvd | |
| 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/pvd')
| -rw-r--r-- | PxShared/src/pvd/src/PxProfileMemoryBuffer.h | 9 | ||||
| -rw-r--r-- | PxShared/src/pvd/src/PxPvdCommStreamEvents.h | 1 | ||||
| -rw-r--r-- | PxShared/src/pvd/src/PxPvdDataStream.cpp | 2 | ||||
| -rw-r--r-- | PxShared/src/pvd/src/PxPvdObjectModelInternalTypes.h | 4 |
4 files changed, 10 insertions, 6 deletions
diff --git a/PxShared/src/pvd/src/PxProfileMemoryBuffer.h b/PxShared/src/pvd/src/PxProfileMemoryBuffer.h index f20139cd..606f1dfe 100644 --- a/PxShared/src/pvd/src/PxProfileMemoryBuffer.h +++ b/PxShared/src/pvd/src/PxProfileMemoryBuffer.h @@ -33,6 +33,7 @@ #include "PxProfileBase.h" #include "PsAllocator.h" +#include "foundation/PxMemory.h" namespace physx { namespace profile { @@ -84,7 +85,7 @@ namespace physx { namespace profile { { uint32_t writeSize = inLength * sizeof( TDataType ); growBuf( writeSize ); - memcpy( mBegin + size(), inValue, writeSize ); + PxMemCopy( mBegin + size(), inValue, writeSize ); mEnd += writeSize; return writeSize; } @@ -100,7 +101,7 @@ namespace physx { namespace profile { { uint32_t writeSize = inLength * sizeof(TDataType); PX_ASSERT(mBegin + index + writeSize < mCapacityEnd); - memcpy(mBegin + index, inValue, writeSize); + PxMemCopy(mBegin + index, inValue, writeSize); return writeSize; } return 0; @@ -127,7 +128,7 @@ namespace physx { namespace profile { memset(newData, 0xf,allocSize); if ( mBegin ) { - memcpy( newData, mBegin, currentSize ); + PxMemCopy( newData, mBegin, currentSize ); TAllocator::deallocate( mBegin ); } mBegin = newData; @@ -179,7 +180,7 @@ namespace physx { namespace profile { if (inValue && inLength) { uint32_t writeSize = inLength * sizeof(TDataType); - memcpy(mBegin + size(), inValue, writeSize); + PxMemCopy(mBegin + size(), inValue, writeSize); mEnd += writeSize; return writeSize; } diff --git a/PxShared/src/pvd/src/PxPvdCommStreamEvents.h b/PxShared/src/pvd/src/PxPvdCommStreamEvents.h index 4aa41184..82f171e5 100644 --- a/PxShared/src/pvd/src/PxPvdCommStreamEvents.h +++ b/PxShared/src/pvd/src/PxPvdCommStreamEvents.h @@ -137,6 +137,7 @@ struct PvdCommStreamEventTypes DECLARE_COMM_STREAM_EVENTS #undef DECLARE_PVD_COMM_STREAM_EVENT_NO_COMMA #undef DECLARE_PVD_COMM_STREAM_EVENT + , Last }; }; diff --git a/PxShared/src/pvd/src/PxPvdDataStream.cpp b/PxShared/src/pvd/src/PxPvdDataStream.cpp index 39730e16..a74fc312 100644 --- a/PxShared/src/pvd/src/PxPvdDataStream.cpp +++ b/PxShared/src/pvd/src/PxPvdDataStream.cpp @@ -101,7 +101,7 @@ struct PropertyDefinitionHelper : public PvdPropertyDefinitionHelper mNameBuffer.resize(static_cast<uint32_t>(resizeLen + strLen)); char* endPtr = mNameBuffer.begin() + endBufOffset; - memcpy(endPtr, str, strLen); + PxMemCopy(endPtr, str, static_cast<uint32_t>(strLen)); } virtual void pushName(const char* nm, const char* appender = ".") diff --git a/PxShared/src/pvd/src/PxPvdObjectModelInternalTypes.h b/PxShared/src/pvd/src/PxPvdObjectModelInternalTypes.h index e3bef0ec..fee63701 100644 --- a/PxShared/src/pvd/src/PxPvdObjectModelInternalTypes.h +++ b/PxShared/src/pvd/src/PxPvdObjectModelInternalTypes.h @@ -27,6 +27,8 @@ #ifndef PXPVDSDK_PXPVDOBJECTMODELINTERNALTYPES_H #define PXPVDSDK_PXPVDOBJECTMODELINTERNALTYPES_H + +#include "foundation/PxMemory.h" #include "PxPvdObjectModelBaseTypes.h" #include "PsArray.h" #include "PxPvdFoundation.h" @@ -109,7 +111,7 @@ static inline char* copyStr(const char* str) str = nonNull(str); uint32_t len = static_cast<uint32_t>(strlen(str)); char* newData = reinterpret_cast<char*>(PX_ALLOC(len + 1, "string")); - memcpy(newData, str, len); + PxMemCopy(newData, str, len); newData[len] = 0; return newData; } |