Fix Collada export image tag
authorMadrich <rsteffen@messbild.de>
Mon, 17 Jul 2017 07:42:26 +0000 (09:42 +0200)
committerMadrich <rsteffen@messbild.de>
Mon, 17 Jul 2017 07:42:26 +0000 (09:42 +0200)
Fix compiler double issues

code/ColladaExporter.cpp
code/IFCLoader.cpp
code/X3DImporter_Geometry3D.cpp

index d701f90..745975e 100644 (file)
@@ -552,7 +552,7 @@ void ColladaExporter::WriteImageEntry( const Surface& pSurface, const std::strin
     std::stringstream imageUrlEncoded;
     for( std::string::const_iterator it = pSurface.texture.begin(); it != pSurface.texture.end(); ++it )
     {
-      if( isalnum_C( (unsigned char) *it) || *it == ':' || *it == '_' || *it == '.' || *it == '/' || *it == '\\' )
+      if( isalnum_C( (unsigned char) *it) || *it == ':' || *it == '_' || *it == '-' || *it == '.' || *it == '/' || *it == '\\' )
         imageUrlEncoded << *it;
       else
         imageUrlEncoded << '%' << std::hex << size_t( (unsigned char) *it) << std::dec;
index 463803a..e8632fa 100644 (file)
@@ -155,7 +155,7 @@ void IFCImporter::SetupProperties(const Importer* pImp)
 {
     settings.skipSpaceRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS,true);
     settings.useCustomTriangulation = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION,true);
-    settings.conicSamplingAngle = std::min(std::max(pImp->GetPropertyFloat(AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE, AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE), 5.0f), 120.0f);
+    settings.conicSamplingAngle = std::min(std::max((float) pImp->GetPropertyFloat(AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE, AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE), 5.0f), 120.0f);
        settings.cylindricalTessellation = std::min(std::max(pImp->GetPropertyInteger(AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION, AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION), 3), 180);
        settings.skipAnnotations = true;
 }
index 721221f..b2e9a28 100644 (file)
@@ -949,7 +949,7 @@ void X3DImporter::ParseNode_Geometry3D_IndexedFaceSet()
 void X3DImporter::ParseNode_Geometry3D_Sphere()
 {
     std::string use, def;
-    float radius = 1;
+    ai_real radius = 1;
     bool solid = true;
     CX3DImporter_NodeElement* ne( nullptr );