mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-02-17 01:31:47 +00:00
Don't memcpy non-trivial type idDrawVert in idSurface constructor
This commit is contained in:
parent
8d2d41345d
commit
59940c9b2f
1 changed files with 3 additions and 1 deletions
|
@ -123,7 +123,9 @@ idSurface::idSurface
|
|||
ID_INLINE idSurface::idSurface( const idDrawVert *verts, const int numVerts, const int *indexes, const int numIndexes ) {
|
||||
assert( verts != NULL && indexes != NULL && numVerts > 0 && numIndexes > 0 );
|
||||
this->verts.SetNum( numVerts );
|
||||
memcpy( this->verts.Ptr(), verts, numVerts * sizeof( verts[0] ) );
|
||||
for (int i = 0; i < numVerts; i++) {
|
||||
this->verts[i] = verts[i];
|
||||
}
|
||||
this->indexes.SetNum( numIndexes );
|
||||
memcpy( this->indexes.Ptr(), indexes, numIndexes * sizeof( indexes[0] ) );
|
||||
GenerateEdgeIndexes();
|
||||
|
|
Loading…
Reference in a new issue