Add missing assignment operator to aiBone
parent
a64d515505
commit
82980c8a9c
|
@ -270,6 +270,32 @@ struct aiBone
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//! Assignment operator
|
||||||
|
aiBone &operator=(const aiBone& other)
|
||||||
|
{
|
||||||
|
if (this == &other) {
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
mName = other.mName;
|
||||||
|
mNumWeights = other.mNumWeights;
|
||||||
|
mOffsetMatrix = other.mOffsetMatrix;
|
||||||
|
|
||||||
|
if (other.mWeights && other.mNumWeights)
|
||||||
|
{
|
||||||
|
if (mWeights) {
|
||||||
|
delete[] mWeights;
|
||||||
|
}
|
||||||
|
|
||||||
|
mWeights = new aiVertexWeight[mNumWeights];
|
||||||
|
::memcpy(mWeights,other.mWeights,mNumWeights * sizeof(aiVertexWeight));
|
||||||
|
}
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//! Destructor - deletes the array of vertex weights
|
//! Destructor - deletes the array of vertex weights
|
||||||
~aiBone()
|
~aiBone()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue