Skip to content

Commit

Permalink
Test alternative stod
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbeattie42 committed Oct 21, 2024
1 parent e2d7e1b commit 12c3560
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OpenSim/Common/IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,11 @@ OpenOutputFile(const string &aFileName,ios_base::openmode mode)
double IO::
stod(const std::string& __str, std::size_t* __idx)
{
double result;
struct ios_base : public std::ios_base {} s3;
s3.imbue(_locale);
std::ios::iostate err = std::ios_base::goodbit;
std::use_facet< std::num_get< char, std::string::const_iterator > >( s3.getloc() ).get( __str.begin(), __str.end(), s3, err, result );
// std::istringstream iss(__str);
// iss.imbue(_locale);
// double result = 0.0;
Expand Down

0 comments on commit 12c3560

Please sign in to comment.