Pārlūkot izejas kodu

Fix to fail in the function fast_atoreal_move when the flag ASSIMP_DOUBLE_PRESICION is enabled (#6250)

* Refix export fbx PolygonVertexIndex

* Fix the function ColladaParser::ReadEffectColor when the flag ASSIMP_DOUBLE_PRESICION is enabled

* Fix the static function ReadLight in ColladaParser when the flag ASSIMP_DOUBLE_PRESICION is enabled

* Refactor of the call of the function fast_atoreal_move to the member of aiColor3D

* Fix the call of the function fast_atoreal_move when the flag ASSIMP_DOUBLE_PRESICION is enabled and and refactor

* Fix the call of the function fast_atoreal_move when the flag ASSIMP_DOUBLE_PRESICION is enabled

---------

Co-authored-by: Kim Kulling <[email protected]>
sSsA01 1 mēnesi atpakaļ
vecāks
revīzija
8355e0c4bc

+ 1 - 1
code/AssetLib/AC/ACLoader.cpp

@@ -125,7 +125,7 @@ inline const char *TAcCheckedLoadFloatArray(const char *buffer, const char *end,
     }
     for (unsigned int _i = 0; _i < num; ++_i) {
         buffer = AcSkipToNextToken(buffer, end);
-        buffer = fast_atoreal_move<float>(buffer, ((float *)out)[_i]);
+        buffer = fast_atoreal_move(buffer, ((float *)out)[_i]);
     }
 
     return buffer;

+ 3 - 3
code/AssetLib/ASE/ASEParser.cpp

@@ -1427,7 +1427,7 @@ void Parser::ParseLV4MeshBonesVertices(unsigned int iNumVertices, ASE::Mesh &mes
 
                     // then parse the vertex weight
                     if (!SkipSpaces(&mFilePtr, mEnd)) break;
-                    mFilePtr = fast_atoreal_move<float>(mFilePtr, pairOut.second);
+                    mFilePtr = fast_atoreal_move(mFilePtr, pairOut.second);
 
                     // -1 marks unused entries
                     if (-1 != pairOut.first) {
@@ -1893,7 +1893,7 @@ void Parser::ParseLV4MeshReal(ai_real &fOut) {
         return;
     }
     // parse the first float
-    mFilePtr = fast_atoreal_move<ai_real>(mFilePtr, fOut);
+    mFilePtr = fast_atoreal_move(mFilePtr, fOut);
 }
 // ------------------------------------------------------------------------------------------------
 void Parser::ParseLV4MeshFloat(float &fOut) {
@@ -1906,7 +1906,7 @@ void Parser::ParseLV4MeshFloat(float &fOut) {
         return;
     }
     // parse the first float
-    mFilePtr = fast_atoreal_move<float>(mFilePtr, fOut);
+    mFilePtr = fast_atoreal_move(mFilePtr, fOut);
 }
 // ------------------------------------------------------------------------------------------------
 void Parser::ParseLV4MeshLong(unsigned int &iOut) {

+ 1 - 1
code/AssetLib/BVH/BVHLoader.cpp

@@ -385,7 +385,7 @@ float BVHLoader::GetNextTokenAsFloat() {
     // check if the float is valid by testing if the atof() function consumed every char of the token
     const char *ctoken = token.c_str();
     float result = 0.0f;
-    ctoken = fast_atoreal_move<float>(ctoken, result);
+    ctoken = fast_atoreal_move(ctoken, result);
 
     if (ctoken != token.c_str() + token.length())
         ThrowException("Expected a floating point number, but found \"", token, "\".");

+ 4 - 4
code/AssetLib/CSM/CSMLoader.cpp

@@ -135,7 +135,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
             else if (TokenMatchI(buffer,"rate",4))  {
                 SkipSpaces(&buffer, end);
                 float d = { 0.0f };
-                buffer = fast_atoreal_move<float>(buffer,d);
+                buffer = fast_atoreal_move(buffer,d);
                 anim->mTicksPerSecond = d;
             }
             else if (TokenMatchI(buffer,"order",5)) {
@@ -226,17 +226,17 @@ void CSMImporter::InternReadFile( const std::string& pFile,
                         } else {
                             aiVectorKey* sub = s->mPositionKeys + s->mNumPositionKeys;
                             sub->mTime = (double)frame;
-                            buffer = fast_atoreal_move<float>(buffer, (float&)sub->mValue.x);
+                            buffer = fast_atoreal_move(buffer, sub->mValue.x);
 
                             if (!SkipSpacesAndLineEnd(&buffer, end)) {
                                 throw DeadlyImportError("CSM: Unexpected EOF occurred reading sample y coord");
                             }
-                            buffer = fast_atoreal_move<float>(buffer, (float&)sub->mValue.y);
+                            buffer = fast_atoreal_move(buffer, sub->mValue.y);
 
                             if (!SkipSpacesAndLineEnd(&buffer, end)) {
                                 throw DeadlyImportError("CSM: Unexpected EOF occurred reading sample z coord");
                             }
-                            buffer = fast_atoreal_move<float>(buffer, (float&)sub->mValue.z);
+                            buffer = fast_atoreal_move(buffer, sub->mValue.z);
 
                             ++s->mNumPositionKeys;
                         }

+ 11 - 11
code/AssetLib/Collada/ColladaParser.cpp

@@ -129,7 +129,7 @@ static void ReadNodeTransformation(XmlNode &node, Node *pNode, TransformType pTy
         // skip whitespace before the number
         SkipSpacesAndLineEnd(&content, end);
         // read a number
-        content = fast_atoreal_move<ai_real>(content, tf.f[a]);
+        content = fast_atoreal_move(content, tf.f[a]);
     }
 
     // place the transformation at the queue of the node
@@ -346,13 +346,13 @@ static void ReadLight(XmlNode &node, Light &pLight) {
             const char *content = v.c_str();
             const char *end = content + v.size();
 
-            content = fast_atoreal_move<ai_real>(content, (ai_real &)pLight.mColor.r);
+            content = fast_atoreal_move(content, pLight.mColor.r);
             SkipSpacesAndLineEnd(&content, end);
 
-            content = fast_atoreal_move<ai_real>(content, (ai_real &)pLight.mColor.g);
+            content = fast_atoreal_move(content, pLight.mColor.g);
             SkipSpacesAndLineEnd(&content, end);
 
-            content = fast_atoreal_move<ai_real>(content, (ai_real &)pLight.mColor.b);
+            content = fast_atoreal_move(content, pLight.mColor.b);
             SkipSpacesAndLineEnd(&content, end);
         } else if (currentName == "constant_attenuation") {
             XmlParser::getValueAsReal(currentNode, pLight.mAttConstant);
@@ -631,7 +631,7 @@ void ColladaParser::ReadAssetInfo(XmlNode &node) {
             std::string tUnitSizeString;
             if (XmlParser::getStdStrAttribute(currentNode, "meter", tUnitSizeString)) {
                 try {
-                    fast_atoreal_move<ai_real>(tUnitSizeString.data(), mUnitSize);
+                    fast_atoreal_move(tUnitSizeString.data(), mUnitSize);
                 } catch (const DeadlyImportError& die) {
                     std::string warning("Collada: Failed to parse meter parameter to real number. Exception:\n");
                     warning.append(die.what());
@@ -889,7 +889,7 @@ void ColladaParser::ReadController(XmlNode &node, Collada::Controller &controlle
             for (auto & a : controller.mBindShapeMatrix) {
                 SkipSpacesAndLineEnd(&content, end);
                 // read a number
-                content = fast_atoreal_move<ai_real>(content, a);
+                content = fast_atoreal_move(content, a);
                 // skip whitespace after it
                 SkipSpacesAndLineEnd(&content, end);
             }
@@ -1262,16 +1262,16 @@ void ColladaParser::ReadEffectColor(XmlNode &node, aiColor4D &pColor, Sampler &p
             const char *content = v.c_str();
             const char *end = v.c_str() + v.size() + 1;
 
-            content = fast_atoreal_move<ai_real>(content, (ai_real &)pColor.r);
+            content = fast_atoreal_move(content, pColor.r);
             SkipSpacesAndLineEnd(&content, end);
 
-            content = fast_atoreal_move<ai_real>(content, (ai_real &)pColor.g);
+            content = fast_atoreal_move(content, pColor.g);
             SkipSpacesAndLineEnd(&content, end);
 
-            content = fast_atoreal_move<ai_real>(content, (ai_real &)pColor.b);
+            content = fast_atoreal_move(content, pColor.b);
             SkipSpacesAndLineEnd(&content, end);
 
-            content = fast_atoreal_move<ai_real>(content, (ai_real &)pColor.a);
+            content = fast_atoreal_move(content, pColor.a);
             SkipSpacesAndLineEnd(&content, end);
         } else if (currentName == "texture") {
             // get name of source texture/sampler
@@ -1494,7 +1494,7 @@ void ColladaParser::ReadDataArray(XmlNode &node) {
 
                 // read a number
                 ai_real value;
-                content = fast_atoreal_move<ai_real>(content, value);
+                content = fast_atoreal_move(content, value);
                 data.mValues.push_back(value);
                 // skip whitespace after it
                 SkipSpacesAndLineEnd(&content, end);

+ 16 - 16
code/AssetLib/Irr/IRRMeshLoader.cpp

@@ -433,24 +433,24 @@ void IRRMeshImporter::ParseBufferVertices(const char *sz, const char *end, Verte
         aiColor4D c;
 
         // Read the vertex position
-        sz = fast_atoreal_move<float>(sz, (float &)temp.x);
+        sz = fast_atoreal_move(sz, temp.x);
         SkipSpaces(&sz, end);
 
-        sz = fast_atoreal_move<float>(sz, (float &)temp.y);
+        sz = fast_atoreal_move(sz, temp.y);
         SkipSpaces(&sz, end);
 
-        sz = fast_atoreal_move<float>(sz, (float &)temp.z);
+        sz = fast_atoreal_move(sz, temp.z);
         SkipSpaces(&sz, end);
         vertices.push_back(temp);
 
         // Read the vertex normals
-        sz = fast_atoreal_move<float>(sz, (float &)temp.x);
+        sz = fast_atoreal_move(sz, temp.x);
         SkipSpaces(&sz, end);
 
-        sz = fast_atoreal_move<float>(sz, (float &)temp.y);
+        sz = fast_atoreal_move(sz, temp.y);
         SkipSpaces(&sz, end);
 
-        sz = fast_atoreal_move<float>(sz, (float &)temp.z);
+        sz = fast_atoreal_move(sz, temp.z);
         SkipSpaces(&sz, end);
         normals.push_back(temp);
 
@@ -466,10 +466,10 @@ void IRRMeshImporter::ParseBufferVertices(const char *sz, const char *end, Verte
         SkipSpaces(&sz, end);
 
         // read the first UV coordinate set
-        sz = fast_atoreal_move<float>(sz, (float &)temp.x);
+        sz = fast_atoreal_move(sz, temp.x);
         SkipSpaces(&sz, end);
 
-        sz = fast_atoreal_move<float>(sz, (float &)temp.y);
+        sz = fast_atoreal_move(sz, temp.y);
         SkipSpaces(&sz, end);
         temp.z = 0.f;
         temp.y = 1.f - temp.y; // DX to OGL
@@ -479,35 +479,35 @@ void IRRMeshImporter::ParseBufferVertices(const char *sz, const char *end, Verte
         // So by definition, all buffers have either UV2 or tangents or neither
         // read the (optional) second UV coordinate set
         if (vertexFormat == VertexFormat::t2coord) {
-            sz = fast_atoreal_move<float>(sz, (float &)temp.x);
+            sz = fast_atoreal_move(sz, temp.x);
             SkipSpaces(&sz, end);
 
-            sz = fast_atoreal_move<float>(sz, (float &)temp.y);
+            sz = fast_atoreal_move(sz, temp.y);
             temp.y = 1.f - temp.y; // DX to OGL
             UV2s.push_back(temp);
         }
         // read optional tangent and bitangent vectors
         else if (vertexFormat == VertexFormat::tangent) {
             // tangents
-            sz = fast_atoreal_move<float>(sz, (float &)temp.x);
+            sz = fast_atoreal_move(sz, temp.x);
             SkipSpaces(&sz, end);
 
-            sz = fast_atoreal_move<float>(sz, (float &)temp.z);
+            sz = fast_atoreal_move(sz, temp.z);
             SkipSpaces(&sz, end);
 
-            sz = fast_atoreal_move<float>(sz, (float &)temp.y);
+            sz = fast_atoreal_move(sz, temp.y);
             SkipSpaces(&sz, end);
             temp.y *= -1.0f;
             tangents.push_back(temp);
 
             // bitangents
-            sz = fast_atoreal_move<float>(sz, (float &)temp.x);
+            sz = fast_atoreal_move(sz, temp.x);
             SkipSpaces(&sz, end);
 
-            sz = fast_atoreal_move<float>(sz, (float &)temp.z);
+            sz = fast_atoreal_move(sz, temp.z);
             SkipSpaces(&sz, end);
 
-            sz = fast_atoreal_move<float>(sz, (float &)temp.y);
+            sz = fast_atoreal_move(sz, temp.y);
             SkipSpaces(&sz, end);
             temp.y *= -1.0f;
             bitangents.push_back(temp);

+ 3 - 3
code/AssetLib/Irr/IRRShared.cpp

@@ -139,21 +139,21 @@ void IrrlichtBase::ReadVectorProperty(VectorProperty &out, pugi::xml_node& vecto
             const char *end = ptr + len;
 
             SkipSpaces(&ptr, end);
-            ptr = fast_atoreal_move<float>(ptr, (float &)out.value.x);
+            ptr = fast_atoreal_move(ptr, out.value.x);
             SkipSpaces(&ptr, end);
             if (',' != *ptr) {
                 ASSIMP_LOG_ERROR("IRR(MESH): Expected comma in vector definition");
             } else {
                 SkipSpaces(ptr + 1, &ptr, end);
             }
-            ptr = fast_atoreal_move<float>(ptr, (float &)out.value.y);
+            ptr = fast_atoreal_move(ptr, out.value.y);
             SkipSpaces(&ptr, end);
             if (',' != *ptr) {
                 ASSIMP_LOG_ERROR("IRR(MESH): Expected comma in vector definition");
             } else {
                 SkipSpaces(ptr + 1, &ptr, end);
             }
-            ptr = fast_atoreal_move<float>(ptr, (float &)out.value.z);
+            ptr = fast_atoreal_move(ptr, out.value.z);
         }
     }
 }

+ 12 - 12
code/AssetLib/LWS/LWSLoader.cpp

@@ -208,9 +208,9 @@ void LWSImporter::ReadEnvelope(const LWS::Element &dad, LWO::Envelope &fill) {
 
             float f;
             SkipSpaces(&c, end);
-            c = fast_atoreal_move<float>(c, key.value);
+            c = fast_atoreal_move(c, key.value);
             SkipSpaces(&c, end);
-            c = fast_atoreal_move<float>(c, f);
+            c = fast_atoreal_move(c, f);
 
             key.time = f;
 
@@ -242,7 +242,7 @@ void LWSImporter::ReadEnvelope(const LWS::Element &dad, LWO::Envelope &fill) {
             }
             for (unsigned int i = 0; i < num; ++i) {
                 SkipSpaces(&c, end);
-                c = fast_atoreal_move<float>(c, key.params[i]);
+                c = fast_atoreal_move(c, key.params[i]);
             }
         } else if ((*it).tokens[0] == "Behaviors") {
             SkipSpaces(&c, end);
@@ -284,11 +284,11 @@ void LWSImporter::ReadEnvelope_Old(std::list<LWS::Element>::const_iterator &it,c
 
             // parse value and time, skip the rest for the moment.
             LWO::Key key;
-            const char *c = fast_atoreal_move<float>((*it).tokens[0].c_str(), key.value);
+            const char *c = fast_atoreal_move((*it).tokens[0].c_str(), key.value);
             const char *end = c + (*it).tokens[0].size();
             SkipSpaces(&c, end);
             float f;
-            fast_atoreal_move<float>((*it).tokens[0].c_str(), f);
+            fast_atoreal_move((*it).tokens[0].c_str(), f);
             key.time = f;
 
             envl.keys.emplace_back(key);
@@ -775,7 +775,7 @@ void LWSImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
                     ASSIMP_LOG_ERROR("LWS: envelopes for  LightIntensity not supported, set to 1.0");
                     nodes.back().lightIntensity = (ai_real)1.0;
                 } else {
-                    fast_atoreal_move<float>(c, nodes.back().lightIntensity);
+                    fast_atoreal_move(c, nodes.back().lightIntensity);
                 }
             }
         }
@@ -816,11 +816,11 @@ void LWSImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
             if (nodes.empty() || nodes.back().type != LWS::NodeDesc::LIGHT) {
                 ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'LightColor\'");
             } else {
-                c = fast_atoreal_move<float>(c, (float &)nodes.back().lightColor.r);
+                c = fast_atoreal_move(c, nodes.back().lightColor.r);
                 SkipSpaces(&c, end);
-                c = fast_atoreal_move<float>(c, (float &)nodes.back().lightColor.g);
+                c = fast_atoreal_move(c, nodes.back().lightColor.g);
                 SkipSpaces(&c, end);
-                c = fast_atoreal_move<float>(c, (float &)nodes.back().lightColor.b);
+                c = fast_atoreal_move(c, nodes.back().lightColor.b);
             }
         }
 
@@ -829,11 +829,11 @@ void LWSImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
             if (nodes.empty()) {
                 ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'PivotPosition\'");
             } else {
-                c = fast_atoreal_move<float>(c, (float &)nodes.back().pivotPos.x);
+                c = fast_atoreal_move(c, nodes.back().pivotPos.x);
                 SkipSpaces(&c, end);
-                c = fast_atoreal_move<float>(c, (float &)nodes.back().pivotPos.y);
+                c = fast_atoreal_move(c, nodes.back().pivotPos.y);
                 SkipSpaces(&c, end);
-                c = fast_atoreal_move<float>(c, (float &)nodes.back().pivotPos.z);
+                c = fast_atoreal_move(c, nodes.back().pivotPos.z);
                 // Mark pivotPos as set
                 nodes.back().isPivotSet = true;
             }

+ 8 - 8
code/AssetLib/MD5/MD5Parser.cpp

@@ -246,11 +246,11 @@ inline void AI_MD5_READ_TRIPLE(aiVector3D &vec, const char **sz, const char *buf
         return;
     ++*sz;
     AI_MD5_SKIP_SPACES(sz, bufferEnd, linenumber);
-    *sz = fast_atoreal_move<float>(*sz, (float &)vec.x);
+    *sz = fast_atoreal_move(*sz, vec.x);
     AI_MD5_SKIP_SPACES(sz, bufferEnd, linenumber);
-    *sz = fast_atoreal_move<float>(*sz, (float &)vec.y);
+    *sz = fast_atoreal_move(*sz, vec.y);
     AI_MD5_SKIP_SPACES(sz, bufferEnd, linenumber);
-    *sz = fast_atoreal_move<float>(*sz, (float &)vec.z);
+    *sz = fast_atoreal_move(*sz, vec.z);
     AI_MD5_SKIP_SPACES(sz, bufferEnd, linenumber);
     if (')' != **sz) {
         MD5Parser::ReportWarning("Unexpected token: ) was expected", linenumber);
@@ -377,9 +377,9 @@ MD5MeshParser::MD5MeshParser(SectionArray &mSections) {
                     if ('(' != *sz++)
                         MD5Parser::ReportWarning("Unexpected token: ( was expected", elem.iLineNumber);
                     AI_MD5_SKIP_SPACES(&sz, elem.end, elem.iLineNumber);
-                    sz = fast_atoreal_move<float>(sz, (float &)vert.mUV.x);
+                    sz = fast_atoreal_move(sz, vert.mUV.x);
                     AI_MD5_SKIP_SPACES(&sz, elem.end, elem.iLineNumber);
-                    sz = fast_atoreal_move<float>(sz, (float &)vert.mUV.y);
+                    sz = fast_atoreal_move(sz, vert.mUV.y);
                     AI_MD5_SKIP_SPACES(&sz, elem.end, elem.iLineNumber);
                     if (')' != *sz++)
                         MD5Parser::ReportWarning("Unexpected token: ) was expected", elem.iLineNumber);
@@ -415,7 +415,7 @@ MD5MeshParser::MD5MeshParser(SectionArray &mSections) {
                     WeightDesc &weight = desc.mWeights[idx];
                     weight.mBone = strtoul10(sz, &sz);
                     AI_MD5_SKIP_SPACES(&sz, elem.end, elem.iLineNumber);
-                    sz = fast_atoreal_move<float>(sz, weight.mWeight);
+                    sz = fast_atoreal_move(sz, weight.mWeight);
                     AI_MD5_READ_TRIPLE(weight.vOffsetPosition, &sz, elem.end, elem.iLineNumber);
                 }
             }
@@ -486,7 +486,7 @@ MD5AnimParser::MD5AnimParser(SectionArray &mSections) {
                 const char *sz = elem.szStart;
                 while (SkipSpacesAndLineEnd(&sz, elem.end)) {
                     float f;
-                    sz = fast_atoreal_move<float>(sz, f);
+                    sz = fast_atoreal_move(sz, f);
                     desc.mValues.push_back(f);
                 }
             }
@@ -503,7 +503,7 @@ MD5AnimParser::MD5AnimParser(SectionArray &mSections) {
         } else if ((*iter).mName == "numAnimatedComponents") {
             mAnimatedBones.reserve(strtoul10((*iter).mGlobalValue.c_str()));
         } else if ((*iter).mName == "frameRate") {
-            fast_atoreal_move<float>((*iter).mGlobalValue.c_str(), fFrameRate);
+            fast_atoreal_move((*iter).mGlobalValue.c_str(), fFrameRate);
         }
     }
     ASSIMP_LOG_DEBUG("MD5AnimParser end");

+ 1 - 1
code/AssetLib/NFF/NFFLoader.cpp

@@ -86,7 +86,7 @@ const aiImporterDesc *NFFImporter::GetInfo() const {
 // ------------------------------------------------------------------------------------------------
 #define AI_NFF_PARSE_FLOAT(f) \
     SkipSpaces(&sz, lineEnd);          \
-    if (!IsLineEnd(*sz)) sz = fast_atoreal_move<ai_real>(sz, (ai_real &)f);
+    if (!IsLineEnd(*sz)) sz = fast_atoreal_move(sz, (ai_real &)f);
 
 // ------------------------------------------------------------------------------------------------
 #define AI_NFF_PARSE_TRIPLE(v) \

+ 11 - 11
code/AssetLib/OFF/OFFLoader.cpp

@@ -212,14 +212,14 @@ void OFFImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
         // stop at dimensions: this allows loading 1D or 2D coordinate vertices
         for (unsigned int dim = 0; dim < dimensions; ++dim) {
             SkipSpaces(&sz, lineEnd);
-            sz = fast_atoreal_move<ai_real>(sz, *vec[dim]);
+            sz = fast_atoreal_move(sz, *vec[dim]);
         }
 
         // if has homogeneous coordinate, divide others by this one
         if (hasHomogenous) {
             SkipSpaces(&sz, lineEnd);
             ai_real w = 1.;
-            sz = fast_atoreal_move<ai_real>(sz, w);
+            sz = fast_atoreal_move(sz, w);
             for (unsigned int dim = 0; dim < dimensions; ++dim) {
                 *(vec[dim]) /= w;
             }
@@ -229,11 +229,11 @@ void OFFImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
         if (hasNormals) {
             aiVector3D &n = mesh->mNormals[i];
             SkipSpaces(&sz, lineEnd);
-            sz = fast_atoreal_move<ai_real>(sz, (ai_real &)n.x);
+            sz = fast_atoreal_move(sz, n.x);
             SkipSpaces(&sz, lineEnd);
-            sz = fast_atoreal_move<ai_real>(sz, (ai_real &)n.y);
+            sz = fast_atoreal_move(sz, n.y);
             SkipSpaces(&sz, lineEnd);
-            fast_atoreal_move<ai_real>(sz, (ai_real &)n.z);
+            fast_atoreal_move(sz, n.z);
         }
 
         // reading colors is a pain because the specification says it can be
@@ -243,22 +243,22 @@ void OFFImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
         if (hasColors) {
             aiColor4D &c = mesh->mColors[0][i];
             SkipSpaces(&sz, lineEnd);
-            sz = fast_atoreal_move<ai_real>(sz, (ai_real &)c.r);
+            sz = fast_atoreal_move(sz, c.r);
             if (*sz != '#' && *sz != '\n' && *sz != '\r') {
                 SkipSpaces(&sz, lineEnd);
-                sz = fast_atoreal_move<ai_real>(sz, (ai_real &)c.g);
+                sz = fast_atoreal_move(sz, c.g);
             } else {
                 c.g = 0.;
             }
             if (*sz != '#' && *sz != '\n' && *sz != '\r') {
                 SkipSpaces(&sz, lineEnd);
-                sz = fast_atoreal_move<ai_real>(sz, (ai_real &)c.b);
+                sz = fast_atoreal_move(sz, c.b);
             } else {
                 c.b = 0.;
             }
             if (*sz != '#' && *sz != '\n' && *sz != '\r') {
                 SkipSpaces(&sz, lineEnd);
-                sz = fast_atoreal_move<ai_real>(sz, (ai_real &)c.a);
+                sz = fast_atoreal_move(sz, c.a);
             } else {
                 c.a = 1.;
             }
@@ -266,9 +266,9 @@ void OFFImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
         if (hasTexCoord) {
             aiVector3D &t = mesh->mTextureCoords[0][i];
             SkipSpaces(&sz, lineEnd);
-            sz = fast_atoreal_move<ai_real>(sz, (ai_real &)t.x);
+            sz = fast_atoreal_move(sz, t.x);
             SkipSpaces(&sz, lineEnd);
-            fast_atoreal_move<ai_real>(sz, (ai_real &)t.y);
+            fast_atoreal_move(sz, t.y);
         }
     }
 

+ 2 - 2
code/AssetLib/Ply/PlyParser.cpp

@@ -828,13 +828,13 @@ bool PLY::PropertyInstance::ParseValue(const char *&pCur,
         // technically this should cast to float, but people tend to use float descriptors for double data
         // this is the best way to not risk losing precision on import and it doesn't hurt to do this
         ai_real f;
-        pCur = fast_atoreal_move<ai_real>(pCur, f);
+        pCur = fast_atoreal_move(pCur, f);
         out->fFloat = (ai_real)f;
         break;
 
     case EDT_Double:
         double d;
-        pCur = fast_atoreal_move<double>(pCur, d);
+        pCur = fast_atoreal_move(pCur, d);
         out->fDouble = (double)d;
         break;
 

+ 1 - 1
code/AssetLib/Raw/RawLoader.cpp

@@ -136,7 +136,7 @@ void RAWImporter::InternReadFile(const std::string &pFile,
             unsigned int num;
             for (num = 0; num < 12; ++num) {
                 if (!SkipSpaces(&sz, end) || !IsNumeric(*sz)) break;
-                sz = fast_atoreal_move<float>(sz, data[num]);
+                sz = fast_atoreal_move(sz, data[num]);
             }
             if (num != 12 && num != 9) {
                 ASSIMP_LOG_ERROR("A line may have either 9 or 12 floats and an optional texture");

+ 1 - 1
code/AssetLib/SMD/SMDLoader.cpp

@@ -982,7 +982,7 @@ bool SMDImporter::ParseFloat(const char *szCurrent, const char **szCurrentOut, c
         return false;
     }
 
-    *szCurrentOut = fast_atoreal_move<float>(szCurrent,out);
+    *szCurrentOut = fast_atoreal_move(szCurrent,out);
     return true;
 }
 

+ 1 - 1
code/AssetLib/STEPParser/STEPFileReader.cpp

@@ -404,7 +404,7 @@ std::shared_ptr<const EXPRESS::DataType> EXPRESS::DataType::Parse(const char*& i
     for(;*cur  && *cur != ',' && *cur != ')' && !IsSpace(*cur);++cur) {
         if (*cur == '.') {
             double f;
-            inout = fast_atoreal_move<double>(start,f);
+            inout = fast_atoreal_move(start,f);
             return std::make_shared<EXPRESS::REAL>(f);
         }
     }

+ 6 - 6
code/AssetLib/STL/STLLoader.cpp

@@ -294,11 +294,11 @@ void STLImporter::LoadASCIIFile(aiNode *root) {
                     aiVector3D vn;
                     sz += 7;
                     SkipSpaces(&sz, bufferEnd);
-                    sz = fast_atoreal_move<ai_real>(sz, (ai_real &)vn.x);
+                    sz = fast_atoreal_move(sz, vn.x);
                     SkipSpaces(&sz, bufferEnd);
-                    sz = fast_atoreal_move<ai_real>(sz, (ai_real &)vn.y);
+                    sz = fast_atoreal_move(sz, vn.y);
                     SkipSpaces(&sz, bufferEnd);
-                    sz = fast_atoreal_move<ai_real>(sz, (ai_real &)vn.z);
+                    sz = fast_atoreal_move(sz, vn.z);
                     normalBuffer.emplace_back(vn);
                     normalBuffer.emplace_back(vn);
                     normalBuffer.emplace_back(vn);
@@ -315,11 +315,11 @@ void STLImporter::LoadASCIIFile(aiNode *root) {
                     SkipSpaces(&sz, bufferEnd);
                     positionBuffer.emplace_back();
                     aiVector3D *vn = &positionBuffer.back();
-                    sz = fast_atoreal_move<ai_real>(sz, (ai_real &)vn->x);
+                    sz = fast_atoreal_move(sz, vn->x);
                     SkipSpaces(&sz, bufferEnd);
-                    sz = fast_atoreal_move<ai_real>(sz, (ai_real &)vn->y);
+                    sz = fast_atoreal_move(sz, vn->y);
                     SkipSpaces(&sz, bufferEnd);
-                    sz = fast_atoreal_move<ai_real>(sz, (ai_real &)vn->z);
+                    sz = fast_atoreal_move(sz, vn->z);
                     faceVertexCounter++;
                 }
             } else if (!::strncmp(sz, "endsolid", 8)) {

+ 3 - 3
code/AssetLib/Unreal/UnrealLoader.cpp

@@ -383,11 +383,11 @@ void UnrealImporter::InternReadFile(const std::string &pFile,
 
                         for (; !IsLineEnd(*data); ++data) {
                             if (data[0] == 'X' && data[1] == '=') {
-                                data = fast_atoreal_move<float>(data + 2, (float &)nd->mTransformation.a1);
+                                data = fast_atoreal_move(data + 2, nd->mTransformation.a1);
                             } else if (data[0] == 'Y' && data[1] == '=') {
-                                data = fast_atoreal_move<float>(data + 2, (float &)nd->mTransformation.b2);
+                                data = fast_atoreal_move(data + 2, nd->mTransformation.b2);
                             } else if (data[0] == 'Z' && data[1] == '=') {
-                                data = fast_atoreal_move<float>(data + 2, (float &)nd->mTransformation.c3);
+                                data = fast_atoreal_move(data + 2, nd->mTransformation.c3);
                             }
                         }
                     }

+ 1 - 1
code/AssetLib/X/XFileParser.cpp

@@ -1277,7 +1277,7 @@ ai_real XFileParser::ReadFloat() {
     }
 
     ai_real result = 0.0;
-    mP = fast_atoreal_move<ai_real>(mP, result);
+    mP = fast_atoreal_move(mP, result);
 
     CheckForSeparator();
 

+ 1 - 1
code/Material/MaterialSystem.cpp

@@ -159,7 +159,7 @@ aiReturn GetMaterialFloatArray(const aiMaterial *pMat,
         ai_assert(prop->mDataLength >= 5);
         ai_assert(!prop->mData[prop->mDataLength - 1]);
         for (unsigned int a = 0;; ++a) {
-            cur = fast_atoreal_move<TReal>(cur, pOut[a]);
+            cur = fast_atoreal_move(cur, pOut[a]);
             if (a == iWrite - 1) {
                 break;
             }