File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818#include " ShapeTesselator.h"
1919
2020#include < algorithm>
21- #include < charconv>
2221#include < cmath>
22+ #include < cstdio>
2323#include < cstring>
2424#include < fstream>
2525#include < iostream>
5454#include < TColStd_Array1OfInteger.hxx>
5555
5656// ========================================================================
57- // Fast float-to-string helpers using C++17 std::to_chars
57+ // Fast float-to-string helpers
5858// ========================================================================
5959
6060namespace {
61- // ! Append a float to a string using std::to_chars (no locale, no virtual dispatch )
61+ // ! Append a float to a string using snprintf (portable across all platforms )
6262 inline void appendFloat (std::string& out, float f) {
6363 char buf[32 ];
64- auto [ptr, ec] = std::to_chars (buf, buf + sizeof (buf), f);
65- out.append (buf, static_cast <size_t >(ptr - buf ));
64+ int len = std::snprintf (buf, sizeof (buf), " %g " , f);
65+ out.append (buf, static_cast <size_t >(len ));
6666 }
6767
6868 // ! Append a float with epsilon clamping (for X3D export compatibility)
You can’t perform that action at this time.
0 commit comments