From c6620478ecda02de87d16ad4084ead03b0387782 Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Wed, 24 Jul 2019 16:12:06 +0100 Subject: [PATCH] Fix GCC warnings reported by Travis --- code/Common/ZipArchiveIOSystem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/Common/ZipArchiveIOSystem.cpp b/code/Common/ZipArchiveIOSystem.cpp index 8079db0b8..463c2071b 100644 --- a/code/Common/ZipArchiveIOSystem.cpp +++ b/code/Common/ZipArchiveIOSystem.cpp @@ -226,7 +226,7 @@ namespace Assimp { ZipFile *zip_file = new ZipFile(m_Size); - if (unzReadCurrentFile(zip_handle, zip_file->m_Buffer.get(), static_cast(m_Size)) != m_Size) + if (unzReadCurrentFile(zip_handle, zip_file->m_Buffer.get(), static_cast(m_Size)) != static_cast(m_Size)) { // Failed, release the memory delete zip_file; @@ -281,6 +281,7 @@ namespace Assimp { m_SeekPtr = m_Size - pOffset; return aiReturn_SUCCESS; } + default:; } return aiReturn_FAILURE; @@ -355,7 +356,7 @@ namespace Assimp { if (fileInfo.uncompressed_size != 0) { std::string filename_string(filename, fileInfo.size_filename); SimplifyFilename(filename_string); - std::pair result = m_ArchiveMap.insert(std::make_pair(filename_string, ZipFileInfo(m_ZipFileHandle, fileInfo.uncompressed_size))); + m_ArchiveMap.emplace(filename_string, ZipFileInfo(m_ZipFileHandle, fileInfo.uncompressed_size)); } } } while (unzGoToNextFile(m_ZipFileHandle) != UNZ_END_OF_LIST_OF_FILE);