Merge branch 'master' into FBXMeshGeometry_checksizes_fix

pull/2984/head
Max Vollmer (Microsoft Havok) 2020-02-05 11:12:57 +00:00 committed by GitHub
commit eb1d25631b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 8 deletions

View File

@ -250,7 +250,7 @@ aiNode* COBImporter::BuildNodes(const Node& root,const Scene& scin,aiScene* fill
const Mesh& ndmesh = (const Mesh&)(root);
if (ndmesh.vertex_positions.size() && ndmesh.texture_coords.size()) {
typedef std::pair<unsigned int,Mesh::FaceRefList> Entry;
typedef std::pair<const unsigned int,Mesh::FaceRefList> Entry;
for(const Entry& reflist : ndmesh.temp_map) {
{ // create mesh
size_t n = 0;

View File

@ -1312,7 +1312,6 @@ void SceneCombiner::Copy(aiMetadata** _dest, const aiMetadata* src) {
aiMetadata* dest = *_dest = aiMetadata::Alloc( src->mNumProperties );
std::copy(src->mKeys, src->mKeys + src->mNumProperties, dest->mKeys);
dest->mValues = new aiMetadataEntry[src->mNumProperties];
for (unsigned int i = 0; i < src->mNumProperties; ++i) {
aiMetadataEntry& in = src->mValues[i];
aiMetadataEntry& out = dest->mValues[i];

View File

@ -323,7 +323,7 @@ public:
// oh well.
bool have_param = false, have_point = false;
IfcVector3 point;
for(const Entry sel :entity.Trim1) {
for(const Entry& sel :entity.Trim1) {
if (const ::Assimp::STEP::EXPRESS::REAL* const r = sel->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
range.first = *r;
have_param = true;
@ -340,7 +340,7 @@ public:
}
}
have_param = false, have_point = false;
for(const Entry sel :entity.Trim2) {
for(const Entry& sel :entity.Trim2) {
if (const ::Assimp::STEP::EXPRESS::REAL* const r = sel->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
range.second = *r;
have_param = true;

View File

@ -685,7 +685,7 @@ bool XGLImporter::ReadMesh(TempScope& scope)
}
// finally extract output meshes and add them to the scope
typedef std::pair<unsigned int, TempMaterialMesh> pairt;
typedef std::pair<const unsigned int, TempMaterialMesh> pairt;
for(const pairt& p : bymat) {
aiMesh* const m = ToOutputMesh(p.second);
scope.meshes_linear.push_back(m);