replaced boost smart pointers with c++11 smart pointers
This commit is contained in:
@@ -164,7 +164,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
|
||||
#endif
|
||||
|
||||
FileDatabase file;
|
||||
boost::shared_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
|
||||
std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
|
||||
if (!stream) {
|
||||
ThrowException("Could not open file for reading");
|
||||
}
|
||||
@@ -190,7 +190,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
|
||||
|
||||
// http://www.gzip.org/zlib/rfc-gzip.html#header-trailer
|
||||
stream->Seek(0L,aiOrigin_SET);
|
||||
boost::shared_ptr<StreamReaderLE> reader = boost::shared_ptr<StreamReaderLE>(new StreamReaderLE(stream));
|
||||
std::shared_ptr<StreamReaderLE> reader = std::shared_ptr<StreamReaderLE>(new StreamReaderLE(stream));
|
||||
|
||||
// build a zlib stream
|
||||
z_stream zstream;
|
||||
@@ -260,9 +260,9 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void BlenderImporter::ParseBlendFile(FileDatabase& out, boost::shared_ptr<IOStream> stream)
|
||||
void BlenderImporter::ParseBlendFile(FileDatabase& out, std::shared_ptr<IOStream> stream)
|
||||
{
|
||||
out.reader = boost::shared_ptr<StreamReaderAny>(new StreamReaderAny(stream,out.little));
|
||||
out.reader = std::shared_ptr<StreamReaderAny>(new StreamReaderAny(stream,out.little));
|
||||
|
||||
DNAParser dna_reader(out);
|
||||
const DNA* dna = NULL;
|
||||
@@ -342,7 +342,7 @@ void BlenderImporter::ConvertBlendFile(aiScene* out, const Scene& in,const FileD
|
||||
// the file. This is terrible. Here, we're first looking for
|
||||
// all objects which don't have parent objects at all -
|
||||
std::deque<const Object*> no_parents;
|
||||
for (boost::shared_ptr<Base> cur = boost::static_pointer_cast<Base> ( in.base.first ); cur; cur = cur->next) {
|
||||
for (std::shared_ptr<Base> cur = std::static_pointer_cast<Base> ( in.base.first ); cur; cur = cur->next) {
|
||||
if (cur->object) {
|
||||
if(!cur->object->parent) {
|
||||
no_parents.push_back(cur->object.get());
|
||||
@@ -350,7 +350,7 @@ void BlenderImporter::ConvertBlendFile(aiScene* out, const Scene& in,const FileD
|
||||
else conv.objects.insert(cur->object.get());
|
||||
}
|
||||
}
|
||||
for (boost::shared_ptr<Base> cur = in.basact; cur; cur = cur->next) {
|
||||
for (std::shared_ptr<Base> cur = in.basact; cur; cur = cur->next) {
|
||||
if (cur->object) {
|
||||
if(cur->object->parent) {
|
||||
conv.objects.insert(cur->object.get());
|
||||
@@ -565,7 +565,7 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
|
||||
|
||||
if (index == static_cast<unsigned int>( -1 )) {
|
||||
// Setup a default material.
|
||||
boost::shared_ptr<Material> p(new Material());
|
||||
std::shared_ptr<Material> p(new Material());
|
||||
ai_assert(::strlen(AI_DEFAULT_MATERIAL_NAME) < sizeof(p->id.name)-2);
|
||||
strcpy( p->id.name+2, AI_DEFAULT_MATERIAL_NAME );
|
||||
|
||||
@@ -589,7 +589,7 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
|
||||
}
|
||||
}
|
||||
|
||||
for(boost::shared_ptr<Material> mat : conv_data.materials_raw) {
|
||||
for(std::shared_ptr<Material> mat : conv_data.materials_raw) {
|
||||
|
||||
// reset per material global counters
|
||||
for (size_t i = 0; i < sizeof(conv_data.next_texture)/sizeof(conv_data.next_texture[0]);++i) {
|
||||
@@ -749,8 +749,8 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
|
||||
ThrowException("Material index is out of range");
|
||||
}
|
||||
|
||||
boost::shared_ptr<Material> mat = mesh->mat[it.first];
|
||||
const std::deque< boost::shared_ptr<Material> >::iterator has = std::find(
|
||||
std::shared_ptr<Material> mat = mesh->mat[it.first];
|
||||
const std::deque< std::shared_ptr<Material> >::iterator has = std::find(
|
||||
conv_data.materials_raw.begin(),
|
||||
conv_data.materials_raw.end(),mat
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user