diff options
| author | sschirm <[email protected]> | 2017-02-27 16:40:12 +0100 |
|---|---|---|
| committer | sschirm <[email protected]> | 2017-03-01 18:04:26 +0100 |
| commit | 7840347c32755e94a807f978f1cbb558717ac8cf (patch) | |
| tree | 295cd3ca93a45f8fcc43cf3cbf3887c0e0c5526b /PhysX_3.4/Source/PhysXExtensions/src/serialization/Xml/SnXmlDeserializer.h | |
| parent | Pre-release comments marking end of beta. (diff) | |
| download | physx-3.4-7840347c32755e94a807f978f1cbb558717ac8cf.tar.xz physx-3.4-7840347c32755e94a807f978f1cbb558717ac8cf.zip | |
PhysX 3.4, APEX 1.4 final release @21757769v3.4.0-rc-2
Diffstat (limited to 'PhysX_3.4/Source/PhysXExtensions/src/serialization/Xml/SnXmlDeserializer.h')
| -rw-r--r-- | PhysX_3.4/Source/PhysXExtensions/src/serialization/Xml/SnXmlDeserializer.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/PhysX_3.4/Source/PhysXExtensions/src/serialization/Xml/SnXmlDeserializer.h b/PhysX_3.4/Source/PhysXExtensions/src/serialization/Xml/SnXmlDeserializer.h index 19cb00e6..18e2a9e0 100644 --- a/PhysX_3.4/Source/PhysXExtensions/src/serialization/Xml/SnXmlDeserializer.h +++ b/PhysX_3.4/Source/PhysXExtensions/src/serialization/Xml/SnXmlDeserializer.h @@ -57,6 +57,17 @@ namespace physx { namespace Sn { void deallocate( PxU8* inMem ) { mAllocator->deallocate( inMem ); } }; + inline bool isEmpty(const char *s) + { + while (*s != '\0') + { + if (!isspace(*s)) + return false; + s++; + } + return true; + } + inline void strtoLong( Triangle<PxU32>& ioDatatype,const char*& ioData ) { strto( ioDatatype.mIdx0, ioData ); @@ -144,9 +155,7 @@ namespace physx { namespace Sn { ++theCount; char* theStartData = const_cast< char*>( copyStr( &tempAllocator, theSrcData ) ); const char* theData = theStartData; - PxU32 theLen = strLenght( theData ); - const char* theEndData = theData + theLen; - while( theData < theEndData ) + while( !isEmpty(theData) ) { //These buffers are whitespace delimited. TDataType theType; |