Browse Source

Sonar fixes

Jorrit Rouwe 4 years ago
parent
commit
0d0cd36305

+ 1 - 1
Jolt/AABBTree/TriangleCodec/TriangleCodecIndexed8BitPackSOA4Flags.h

@@ -122,7 +122,7 @@ public:
 			uint start_vertex = Clamp((int)mVertices.size() - 256 + (int)tri_count * 3, 0, (int)mVertices.size());
 			uint start_vertex = Clamp((int)mVertices.size() - 256 + (int)tri_count * 3, 0, (int)mVertices.size());
 
 
 			// Store the start vertex offset, this will later be patched to give the delta offset relative to the triangle block
 			// Store the start vertex offset, this will later be patched to give the delta offset relative to the triangle block
-			mOffsetsToPatch.push_back(uint((uint8 *)&header->mOffsetToVertices - (uint8 *)&ioBuffer[0]));
+			mOffsetsToPatch.push_back(uint((uint8 *)&header->mOffsetToVertices - &ioBuffer[0]));
 			header->mOffsetToVertices = start_vertex * sizeof(VertexData);
 			header->mOffsetToVertices = start_vertex * sizeof(VertexData);
 
 
 			// Pack vertices
 			// Pack vertices

+ 0 - 4
Jolt/ObjectStream/ObjectStreamOut.cpp

@@ -18,7 +18,6 @@ ObjectStreamOut::ObjectStreamOut(ostream &inStream) :
 // Add all primitives to the class set
 // Add all primitives to the class set
 #define JPH_DECLARE_PRIMITIVE(name)	mClassSet.insert(JPH_RTTI(name));
 #define JPH_DECLARE_PRIMITIVE(name)	mClassSet.insert(JPH_RTTI(name));
 #include <ObjectStream/ObjectStreamTypes.h>
 #include <ObjectStream/ObjectStreamTypes.h>
-#undef JPH_DECLARE_PRIMITIVE
 }
 }
 
 
 ObjectStreamOut *ObjectStreamOut::Open(EStreamType inType, ostream &inStream)
 ObjectStreamOut *ObjectStreamOut::Open(EStreamType inType, ostream &inStream)
@@ -182,7 +181,4 @@ void ObjectStreamOut::WritePointerData(const RTTI *inRTTI, const void *inPointer
 // This file uses the JPH_DECLARE_PRIMITIVE macro to define all types
 // This file uses the JPH_DECLARE_PRIMITIVE macro to define all types
 #include <ObjectStream/ObjectStreamTypes.h>
 #include <ObjectStream/ObjectStreamTypes.h>
 
 
-// Remove macro
-#undef JPH_DECLARE_PRIMITIVE
-
 } // JPH
 } // JPH