From 9d553479db18c93593009dd89692ca707b29d386 Mon Sep 17 00:00:00 2001 From: Jan Orend <56254096+3dJan@users.noreply.github.com> Date: Fri, 20 Oct 2023 10:04:25 +0200 Subject: [PATCH] Replacing strtof with fnStringToFloat --- .../Reader/v093/NMR_ModelReaderNode093_TextureVertex.cpp | 4 ++-- Source/Model/Reader/v093/NMR_ModelReaderNode093_Vertex.cpp | 6 +++--- Source/Model/Reader/v100/NMR_ModelReaderNode100_Vertex.cpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Model/Reader/v093/NMR_ModelReaderNode093_TextureVertex.cpp b/Source/Model/Reader/v093/NMR_ModelReaderNode093_TextureVertex.cpp index b4a253ff0..b18f86334 100644 --- a/Source/Model/Reader/v093/NMR_ModelReaderNode093_TextureVertex.cpp +++ b/Source/Model/Reader/v093/NMR_ModelReaderNode093_TextureVertex.cpp @@ -86,7 +86,7 @@ namespace NMR { __NMRASSERT(pAttributeValue); if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_TEXTURE_U) == 0) { - m_fU = strtof(pAttributeValue, nullptr); + m_fU = fnStringToFloat(pAttributeValue); #ifdef __MINGW32__ if (isNotANumber(m_fU)) #else @@ -99,7 +99,7 @@ namespace NMR { } if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_TEXTURE_V) == 0) { - m_fV = strtof(pAttributeValue, nullptr); + m_fV = fnStringToFloat(pAttributeValue); #ifdef __MINGW32__ if (isNotANumber(m_fV)) #else diff --git a/Source/Model/Reader/v093/NMR_ModelReaderNode093_Vertex.cpp b/Source/Model/Reader/v093/NMR_ModelReaderNode093_Vertex.cpp index b1a3f0439..3828b35d4 100644 --- a/Source/Model/Reader/v093/NMR_ModelReaderNode093_Vertex.cpp +++ b/Source/Model/Reader/v093/NMR_ModelReaderNode093_Vertex.cpp @@ -82,7 +82,7 @@ namespace NMR { __NMRASSERT(pAttributeValue); if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VERTEX_X) == 0) { - m_fX = strtof(pAttributeValue, nullptr); + m_fX = fnStringToFloat(pAttributeValue); #ifdef __MINGW32__ if (isNotANumber(m_fX)) #else @@ -95,7 +95,7 @@ namespace NMR { } if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VERTEX_Y) == 0) { - m_fY = strtof(pAttributeValue, nullptr); + m_fY = fnStringToFloat(pAttributeValue); #ifdef __MINGW32__ if (isNotANumber(m_fY)) #else @@ -108,7 +108,7 @@ namespace NMR { } if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VERTEX_Z) == 0) { - m_fZ = strtof(pAttributeValue, nullptr); + m_fZ = fnStringToFloat(pAttributeValue); #ifdef __MINGW32__ if (isNotANumber(m_fZ)) #else diff --git a/Source/Model/Reader/v100/NMR_ModelReaderNode100_Vertex.cpp b/Source/Model/Reader/v100/NMR_ModelReaderNode100_Vertex.cpp index 797e782e6..a2cc72984 100644 --- a/Source/Model/Reader/v100/NMR_ModelReaderNode100_Vertex.cpp +++ b/Source/Model/Reader/v100/NMR_ModelReaderNode100_Vertex.cpp @@ -82,7 +82,7 @@ namespace NMR { __NMRASSERT(pAttributeValue); if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VERTEX_X) == 0) { - m_fX = strtof(pAttributeValue, nullptr); + m_fX = fnStringToFloat(pAttributeValue); if (std::isnan (m_fX)) throw CNMRException(NMR_ERROR_INVALIDMODELCOORDINATES); if (fabs (m_fX) > XML_3MF_MAXIMUMCOORDINATEVALUE) @@ -90,7 +90,7 @@ namespace NMR { m_bHasX = true; } else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VERTEX_Y) == 0) { - m_fY = strtof(pAttributeValue, nullptr); + m_fY = fnStringToFloat(pAttributeValue); if (std::isnan (m_fY)) throw CNMRException(NMR_ERROR_INVALIDMODELCOORDINATES); if (fabs(m_fY) > XML_3MF_MAXIMUMCOORDINATEVALUE) @@ -98,7 +98,7 @@ namespace NMR { m_bHasY = true; } else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VERTEX_Z) == 0) { - m_fZ = strtof(pAttributeValue, nullptr); + m_fZ = fnStringToFloat(pAttributeValue); if (std::isnan (m_fZ)) throw CNMRException(NMR_ERROR_INVALIDMODELCOORDINATES); if (fabs(m_fZ) > XML_3MF_MAXIMUMCOORDINATEVALUE)