diff options
Diffstat (limited to 'src/3rdparty/assimp/code/UnrealLoader.cpp')
-rw-r--r-- | src/3rdparty/assimp/code/UnrealLoader.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/3rdparty/assimp/code/UnrealLoader.cpp b/src/3rdparty/assimp/code/UnrealLoader.cpp index ad839fb25..a79a2a5c5 100644 --- a/src/3rdparty/assimp/code/UnrealLoader.cpp +++ b/src/3rdparty/assimp/code/UnrealLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -60,6 +61,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <assimp/DefaultLogger.hpp> #include <assimp/IOSystem.hpp> #include <assimp/scene.h> +#include <assimp/importerdesc.h> #include <memory> @@ -155,7 +157,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile, DefaultLogger::get()->debug("UNREAL: uc file is " + uc_path); // and open the files ... we can't live without them - IOStream* p = pIOHandler->Open(d_path); + std::unique_ptr<IOStream> p(pIOHandler->Open(d_path)); if (!p) throw DeadlyImportError("UNREAL: Unable to open _d file"); StreamReaderLE d_reader(pIOHandler->Open(d_path)); @@ -201,7 +203,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile, d_reader.IncPtr(1); } - p = pIOHandler->Open(a_path); + p.reset(pIOHandler->Open(a_path)); if (!p) throw DeadlyImportError("UNREAL: Unable to open _a file"); StreamReaderLE a_reader(pIOHandler->Open(a_path)); @@ -333,7 +335,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile, std::vector<Unreal::TempMat>::iterator nt = std::find(materials.begin(),materials.end(),mat); if (nt == materials.end()) { // add material - tri.matIndex = materials.size(); + tri.matIndex = static_cast<unsigned int>(materials.size()); mat.numFaces = 1; materials.push_back(mat); |