Skip to content

Commit

Permalink
Update muParser.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
beltoforion committed Dec 24, 2023
1 parent 2249d3b commit a326a5e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/muParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@ 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!
#if defined(__APPLE__)
// 2023-12-23 Issue #136: This code breaks localization!
//
// I decided to not give a shit about localization being
// broken on Macs's because APPLE does not give a shit about the
// stringstream being broken either. They have the resources to fix their
// compiler, i do not have the resources to work around their failures.

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

#else
value_type fVal(0);

stringstream_type stream(a_szExpr);
Expand All @@ -90,6 +94,7 @@ namespace mu
*a_iPos += (int)iEnd;
*a_fVal = fVal;
return 1;
#endif
}


Expand Down

0 comments on commit a326a5e

Please sign in to comment.