|
| 1 | +diff --git a/src/cpp/web-ifc/geometry/IfcGeometryLoader.cpp b/src/cpp/web-ifc/geometry/IfcGeometryLoader.cpp |
| 2 | +index ebfaf3f2..13ef5d50 100644 |
| 3 | +--- a/src/cpp/web-ifc/geometry/IfcGeometryLoader.cpp |
| 4 | ++++ b/src/cpp/web-ifc/geometry/IfcGeometryLoader.cpp |
| 5 | +@@ -4,6 +4,7 @@ |
| 6 | + |
| 7 | + #include <spdlog/spdlog.h> |
| 8 | + #include <iomanip> |
| 9 | ++#include <sstream> |
| 10 | + #include "IfcGeometryLoader.h" |
| 11 | + #include "operations/curve-utils.h" |
| 12 | + #include "operations/geometryutils.h" |
| 13 | +diff --git a/src/cpp/web-ifc/parsing/IfcLoader.cpp b/src/cpp/web-ifc/parsing/IfcLoader.cpp |
| 14 | +index ae592775..4cb54410 100644 |
| 15 | +--- a/src/cpp/web-ifc/parsing/IfcLoader.cpp |
| 16 | ++++ b/src/cpp/web-ifc/parsing/IfcLoader.cpp |
| 17 | +@@ -6,7 +6,8 @@ |
| 18 | + #include <string> |
| 19 | + #include <cmath> |
| 20 | + #include <algorithm> |
| 21 | +-#include <format> |
| 22 | ++#include <charconv> |
| 23 | ++#include <array> |
| 24 | + #include <fast_float/fast_float.h> |
| 25 | + #include <spdlog/spdlog.h> |
| 26 | + #include "IfcLoader.h" |
| 27 | +@@ -354,7 +355,9 @@ namespace webifc::parsing { |
| 28 | + |
| 29 | + void IfcLoader::PushDouble(double input) |
| 30 | + { |
| 31 | +- std::string numberString = std::format("{}", input); |
| 32 | ++ std::array<char, 64> buf; |
| 33 | ++ auto [ptr, ec] = std::to_chars(buf.data(), buf.data() + buf.size(), input); |
| 34 | ++ std::string numberString(buf.data(), ptr); |
| 35 | + size_t eLoc = numberString.find_first_of('e'); |
| 36 | + if (eLoc != std::string::npos) numberString[eLoc]='E'; |
| 37 | + else if (std::floor(input) == input) numberString+='.'; |
0 commit comments