0
0
mirror of https://github.com/assimp/assimp.git synced 2026-01-18 17:11:20 +01:00

Use std::copy to copy array and remove user destructor to make sure is_trivially_copyable in order to avoid -Wno-error=nontrivial-memcall (#6029)

Use std::copy to copy array and remove user destructor to make sure is_trivially_copyable in order to avoid -Wno-error=nontrivial-memcall (#6029)
This commit is contained in:
T.Yamada
2025-03-11 23:09:10 +09:00
committed by GitHub
parent 70459b4d1f
commit f398a70163
5 changed files with 1 additions and 14 deletions

View File

@@ -985,7 +985,7 @@ inline void GetArrayCopy(Type *&dest, ai_uint num) {
Type *old = dest;
dest = new Type[num];
::memcpy(dest, old, sizeof(Type) * num);
std::copy(old, old+num, dest);
}
// ------------------------------------------------------------------------------------------------
@@ -1095,10 +1095,6 @@ void SceneCombiner::Copy(aiMesh **_dest, const aiMesh *src) {
// make a deep copy of all faces
GetArrayCopy(dest->mFaces, dest->mNumFaces);
for (unsigned int i = 0; i < dest->mNumFaces; ++i) {
aiFace &f = dest->mFaces[i];
GetArrayCopy(f.mIndices, f.mNumIndices);
}
// make a deep copy of all blend shapes
CopyPtrArray(dest->mAnimMeshes, dest->mAnimMeshes, dest->mNumAnimMeshes);

View File

@@ -166,7 +166,6 @@ namespace o3dgc
{
memset(this, 0, sizeof(SC3DMCStats));
};
~SC3DMCStats(void){};
double m_timeCoord;
double m_timeNormal;
@@ -409,4 +408,3 @@ namespace o3dgc
}
}
#endif // O3DGC_COMMON_H

View File

@@ -43,8 +43,6 @@ namespace o3dgc
m_isTriangularMesh = true;
m_creaseAngle = 30;
};
//! Destructor.
~IndexedFaceSet(void) {};
unsigned long GetNCoordIndex() const { return m_nCoordIndex ;}
// only coordIndex is supported
@@ -260,4 +258,3 @@ namespace o3dgc
}
#include "o3dgcIndexedFaceSet.inl" // template implementation
#endif // O3DGC_INDEXED_FACE_SET_H

View File

@@ -51,8 +51,6 @@ namespace o3dgc
m_intAttributePredMode[a] = O3DGC_SC3DMC_NO_PREDICTION;
}
};
//! Destructor.
~SC3DMCEncodeParams(void) {};
O3DGCStreamType GetStreamType() const { return m_streamTypeMode;}
O3DGCSC3DMCEncodingMode GetEncodeMode() const { return m_encodeMode;}
@@ -137,4 +135,3 @@ namespace o3dgc
};
}
#endif // O3DGC_SC3DMC_ENCODE_PARAMS_H

View File

@@ -113,7 +113,6 @@ namespace o3dgc
{
memset(this, 0, sizeof(Timer));
};
~Timer(void){};
void Tic()
{
clock_gettime(CLOCK_REALTIME, &m_start);