fix warning, hopefully ...
parent
f0f6612b81
commit
524e2e4728
|
@ -66,6 +66,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
||||||
|
#if (__GNUC__ >= 8 && __GNUC_MINOR__ >= 0)
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wclass-memaccess"
|
||||||
|
#endif
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Add a prefix to a string
|
// Add a prefix to a string
|
||||||
inline
|
inline
|
||||||
|
@ -98,9 +103,10 @@ void SceneCombiner::AddNodeHashes(aiNode* node, std::set<unsigned int>& hashes)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process all children recursively
|
// Process all children recursively
|
||||||
for (unsigned int i = 0; i < node->mNumChildren;++i)
|
for (unsigned int i = 0; i < node->mNumChildren;++i) {
|
||||||
AddNodeHashes(node->mChildren[i],hashes);
|
AddNodeHashes(node->mChildren[i],hashes);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Add a name prefix to all nodes in a hierarchy
|
// Add a name prefix to all nodes in a hierarchy
|
||||||
|
@ -978,9 +984,7 @@ void GetArrayCopy(Type*& dest, ai_uint num ) {
|
||||||
Type* old = dest;
|
Type* old = dest;
|
||||||
|
|
||||||
dest = new Type[num];
|
dest = new Type[num];
|
||||||
for ( size_t i=0; i<num; ++i ) {
|
::memcpy(dest, old, sizeof(Type) * num);
|
||||||
dest[i] = old[i];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -1076,12 +1080,14 @@ void SceneCombiner::Copy( aiMesh** _dest, const aiMesh* src ) {
|
||||||
GetArrayCopy( dest->mBitangents, dest->mNumVertices );
|
GetArrayCopy( dest->mBitangents, dest->mNumVertices );
|
||||||
|
|
||||||
unsigned int n = 0;
|
unsigned int n = 0;
|
||||||
while (dest->HasTextureCoords(n))
|
while (dest->HasTextureCoords(n)) {
|
||||||
GetArrayCopy( dest->mTextureCoords[n++], dest->mNumVertices );
|
GetArrayCopy( dest->mTextureCoords[n++], dest->mNumVertices );
|
||||||
|
}
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
while (dest->HasVertexColors(n))
|
while (dest->HasVertexColors(n)) {
|
||||||
GetArrayCopy( dest->mColors[n++], dest->mNumVertices );
|
GetArrayCopy( dest->mColors[n++], dest->mNumVertices );
|
||||||
|
}
|
||||||
|
|
||||||
// make a deep copy of all bones
|
// make a deep copy of all bones
|
||||||
CopyPtrArray(dest->mBones,dest->mBones,dest->mNumBones);
|
CopyPtrArray(dest->mBones,dest->mBones,dest->mNumBones);
|
||||||
|
@ -1343,5 +1349,9 @@ void SceneCombiner::Copy(aiMetadata** _dest, const aiMetadata* src) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (__GNUC__ >= 8 && __GNUC_MINOR__ >= 0)
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
} // Namespace Assimp
|
} // Namespace Assimp
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue