From 8549e4b1b185712f1beffcb39a17d566f9090271 Mon Sep 17 00:00:00 2001 From: EdgarsT Date: Tue, 10 Jun 2014 19:58:02 +0300 Subject: [PATCH] fixed OgreImporter compilation error with boost scoped_ptr --- code/OgreImporter.cpp | 8 ++++---- code/OgreStructs.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/OgreImporter.cpp b/code/OgreImporter.cpp index d28b2cf90..fbb50cfc3 100644 --- a/code/OgreImporter.cpp +++ b/code/OgreImporter.cpp @@ -108,10 +108,10 @@ void OgreImporter::InternReadFile(const std::string &pFile, aiScene *pScene, Ass MemoryStreamReader reader(f); // Import mesh - boost::scoped_ptr mesh = OgreBinarySerializer::ImportMesh(&reader); + boost::scoped_ptr mesh(OgreBinarySerializer::ImportMesh(&reader)); // Import skeleton - OgreBinarySerializer::ImportSkeleton(pIOHandler, mesh); + OgreBinarySerializer::ImportSkeleton(pIOHandler, mesh.get()); // Import mesh referenced materials ReadMaterials(pFile, pIOHandler, pScene, mesh.get()); @@ -128,10 +128,10 @@ void OgreImporter::InternReadFile(const std::string &pFile, aiScene *pScene, Ass boost::scoped_ptr reader(irr::io::createIrrXMLReader(xmlStream.get())); // Import mesh - boost::scoped_ptr mesh = OgreXmlSerializer::ImportMesh(reader.get()); + boost::scoped_ptr mesh(OgreXmlSerializer::ImportMesh(reader.get())); // Import skeleton - OgreXmlSerializer::ImportSkeleton(pIOHandler, mesh); + OgreXmlSerializer::ImportSkeleton(pIOHandler, mesh.get()); // Import mesh referenced materials ReadMaterials(pFile, pIOHandler, pScene, mesh.get()); diff --git a/code/OgreStructs.cpp b/code/OgreStructs.cpp index cfedc2320..3eaf2df01 100644 --- a/code/OgreStructs.cpp +++ b/code/OgreStructs.cpp @@ -325,7 +325,7 @@ uint32_t VertexData::VertexSize(uint16_t source) const MemoryStream *VertexData::VertexBuffer(uint16_t source) { if (vertexBindings.find(source) != vertexBindings.end()) - return vertexBindings[source]; + return vertexBindings[source].get(); return 0; }