Просмотр исходного кода

Fix invalid initialization of constexpr.

Kim Kulling 3 лет назад
Родитель
Сommit
9e23d771bc
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      code/AssetLib/IFC/IFCGeometry.cpp
  2. 2 2
      include/assimp/defs.h

+ 1 - 1
code/AssetLib/IFC/IFCGeometry.cpp

@@ -527,7 +527,7 @@ IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh, bool& ok, IfcVect
     return m;
 }
 
-constexpr auto closeDistance = ai_epsilon;
+const auto closeDistance = ai_epsilon;
 
 bool areClose(Schema_2x3::IfcCartesianPoint pt1,Schema_2x3::IfcCartesianPoint pt2) {
     if(pt1.Coordinates.size() != pt2.Coordinates.size())

+ 2 - 2
include/assimp/defs.h

@@ -279,8 +279,8 @@ typedef unsigned int ai_uint;
 #define AI_MATH_HALF_PI_F (AI_MATH_PI_F * 0.5f)
 
 /* Tiny macro to convert from radians to degrees and back */
-#define AI_DEG_TO_RAD(x) ((x) * (ai_real)0.0174532925)
-#define AI_RAD_TO_DEG(x) ((x) * (ai_real)57.2957795)
+#define AI_DEG_TO_RAD(x) ((x) * (ai_real) 0.0174532925)
+#define AI_RAD_TO_DEG(x) ((x) * (ai_real) 57.2957795)
 
 /* Numerical limits */
 static const ai_real ai_epsilon = (ai_real) 1e-6;