Opened 12 years ago
Last modified 3 years ago
#1325 closed defect
Replace ecvt() in FCollada with something else — at Initial Version
Reported by: | historic_bruno | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 24 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description
FCollada uses the deprecated POSIX function ecvt to convert floats to strings, but it's not available on FreeBSD and it would be nice to have a portable replacement. The result needs to be compatible with the COLLADA schema which uses XML's xs:double type for floats.
Possible solutions:
- std::stringstream, or
- snprintf perhaps with the 'g' flag, if it can be massaged into a
xs:double
-compatible format - MIT-licensed
ecvt
replacement: http://piumarta.com/software/fcvt/
It's a good idea to avoid ecvt
implementations that depend on dtoa
, because it's also not available on FreeBSD and there are numerous buggy versions of that code around which apparently break with compiler optimizations.
Note:
See TracTickets
for help on using tickets.