diff --git a/code/Common/SceneCombiner.cpp b/code/Common/SceneCombiner.cpp index 4f262192b..5d49baaf4 100644 --- a/code/Common/SceneCombiner.cpp +++ b/code/Common/SceneCombiner.cpp @@ -66,6 +66,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 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 inline @@ -75,7 +80,7 @@ void PrefixString(aiString& string,const char* prefix, unsigned int len) { return; if (len+string.length>=MAXLEN-1) { - ASSIMP_LOG_VERBOSE_DEBUG("Can't add an unique prefix because the string is too long"); + ASSIMP_LOG_VERBOSE_DEBUG("Can't add an unique prefix because the string is too long"); ai_assert(false); return; } @@ -98,8 +103,9 @@ void SceneCombiner::AddNodeHashes(aiNode* node, std::set& hashes) } // 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); + } } // ------------------------------------------------------------------------------------------------ @@ -978,9 +984,7 @@ void GetArrayCopy(Type*& dest, ai_uint num ) { Type* old = dest; dest = new Type[num]; - for ( size_t i=0; imBitangents, dest->mNumVertices ); unsigned int n = 0; - while (dest->HasTextureCoords(n)) - GetArrayCopy( dest->mTextureCoords[n++], dest->mNumVertices ); + while (dest->HasTextureCoords(n)) { + GetArrayCopy( dest->mTextureCoords[n++], dest->mNumVertices ); + } n = 0; - while (dest->HasVertexColors(n)) - GetArrayCopy( dest->mColors[n++], dest->mNumVertices ); + while (dest->HasVertexColors(n)) { + GetArrayCopy( dest->mColors[n++], dest->mNumVertices ); + } // make a deep copy of all bones 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