fix conversion

pull/3202/head
Kim Kulling 2020-05-04 21:48:46 +02:00 committed by GitHub
parent 6afb72216c
commit bf95d1da7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -787,8 +787,10 @@ void X3DImporter::Postprocess_CollectMetadata(const CX3DImporter_NodeElement& pN
// Add an element according to its type.
if((*it)->Type == CX3DImporter_NodeElement::ENET_MetaBoolean)
{
if(((CX3DImporter_NodeElement_MetaBoolean*)cur_meta)->Value.size() > 0)
pSceneNode.mMetaData->Set(static_cast<unsigned int>(meta_idx), cur_meta->Name, *(((CX3DImporter_NodeElement_MetaBoolean*)cur_meta)->Value.begin()));
if(((CX3DImporter_NodeElement_MetaBoolean*)cur_meta)->Value.size() > 0) {
const bool v = (bool) *( ( (CX3DImporter_NodeElement_MetaBoolean*) cur_meta )->Value.begin());
pSceneNode.mMetaData->Set(static_cast<unsigned int>(meta_idx), cur_meta->Name, v);
}
}
else if((*it)->Type == CX3DImporter_NodeElement::ENET_MetaDouble)
{