fix address sanitizer issues

This commit is contained in:
nillerusr
2022-04-25 17:21:00 +03:00
parent a5e9cdcbe2
commit 2ec2a47a53
17 changed files with 43 additions and 37 deletions
+3 -3
View File
@@ -42,7 +42,7 @@ public:
Polyhedron_IndexedLine_t *pLines;
Polyhedron_IndexedLineReference_t *pIndices;
Polyhedron_IndexedPolygon_t *pPolygons;
unsigned short iVertexCount;
unsigned short iLineCount;
unsigned short iIndexCount;
@@ -53,10 +53,10 @@ public:
Vector Center( void );
};
class CPolyhedron_AllocByNew : public CPolyhedron
class CPolyhedron_AllocByNew final : public CPolyhedron
{
public:
virtual void Release( void );
void Release( void ) override;
static CPolyhedron_AllocByNew *Allocate( unsigned short iVertices, unsigned short iLines, unsigned short iIndices, unsigned short iPolygons ); //creates the polyhedron along with enough memory to hold all it's data in a single allocation
private:
+4 -5
View File
@@ -2062,6 +2062,8 @@ struct studiohdr2_t
struct studiohdr_t
{
DECLARE_BYTESWAP_DATADESC();
studiohdr_t() = default;
int id;
int version;
@@ -2077,10 +2079,10 @@ struct studiohdr_t
Vector illumposition; // illumination center
Vector hull_min; // ideal movement hull size
Vector hull_max;
Vector hull_max;
Vector view_bbmin; // clipping bounding box
Vector view_bbmax;
Vector view_bbmax;
int flags;
@@ -2329,9 +2331,6 @@ struct studiohdr_t
// [and move all fields in studiohdr2_t into studiohdr_t and kill studiohdr2_t],
// or add your stuff to studiohdr2_t. See NumSrcBoneTransforms/SrcBoneTransform for the pattern to use.
int unused2[1];
studiohdr_t() {}
private:
// No copy constructors allowed
studiohdr_t(const studiohdr_t& vOther);