Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
beltoforion committed Dec 24, 2023
1 parent ed5ed04 commit 2249d3b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"files.associations": {
"*.rmd": "markdown",
"stdexcept": "cpp"
"stdexcept": "cpp",
"sstream": "cpp"
}
}
2 changes: 1 addition & 1 deletion include/muParserDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ namespace mu
static const int MaxLenExpression = 20000;
static const int MaxLenIdentifier = 100;
static const string_type ParserVersion = string_type(_T("2.3.4 (Develop)"));
static const string_type ParserVersionDate = string_type(_T("20231013"));
static const string_type ParserVersionDate = string_type(_T("20231224"));
} // end of namespace

#if defined(_MSC_VER)
Expand Down
8 changes: 5 additions & 3 deletions src/muParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include <cmath>
#include <algorithm>
#include <numeric>
#include <cstdlib>


using namespace std;

Expand All @@ -54,8 +56,9 @@ namespace mu
*/
int Parser::IsVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal)
{
/* // 2023-12-23 Issue #136: This code breaks localization!
// 2023-12-23 Issue #136: This code breaks localization!

/*
// fix for #123; std::Stringstream is broken on Mac; use std::stod instead
try
{
Expand All @@ -76,8 +79,7 @@ namespace mu

value_type fVal(0);

// stringstream_type stream(a_szExpr);
std::istringstream stream(a_szExpr);
stringstream_type stream(a_szExpr);
stream.imbue(Parser::s_locale);
stream >> fVal;
stringstream_type::pos_type iEnd = stream.tellg(); // Position after reading
Expand Down

0 comments on commit 2249d3b

Please sign in to comment.