From d529dd17f920a8d5fb33547f866c26b668a265ec Mon Sep 17 00:00:00 2001 From: Alexandre Avenel Date: Fri, 24 Nov 2017 22:29:58 +0100 Subject: [PATCH] Fix warning cast double to float --- code/FIReader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/FIReader.cpp b/code/FIReader.cpp index a0b9b39e1..7aaa32fd2 100755 --- a/code/FIReader.cpp +++ b/code/FIReader.cpp @@ -60,6 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "MemoryIOWrapper.h" #include "irrXMLWrapper.h" #include "../contrib/utf8cpp/source/utf8.h" +#include "fast_atof.h" #include #include #include @@ -714,7 +715,7 @@ public: if (floatValue) { return floatValue->value.size() == 1 ? floatValue->value.front() : 0; } - return atof(attr->value->toString().c_str()); + return fast_atof(attr->value->toString().c_str()); } virtual float getAttributeValueAsFloat(int idx) const /*override*/ { @@ -725,7 +726,7 @@ public: if (floatValue) { return floatValue->value.size() == 1 ? floatValue->value.front() : 0; } - return atof(attributes[idx].value->toString().c_str()); + return fast_atof(attributes[idx].value->toString().c_str()); } virtual const char* getNodeName() const /*override*/ {