diff --git a/ttmath/ttmathparser.h b/ttmath/ttmathparser.h index 547d031..664ab85 100644 --- a/ttmath/ttmathparser.h +++ b/ttmath/ttmathparser.h @@ -432,6 +432,12 @@ VariablesTable variables_table; CGamma cgamma; +/*! + temporary object for a whole string when Parse(std::wstring) is used +*/ +std::string wide_to_ansi; + + /*! we're using this method for reporting an error */ @@ -2591,10 +2597,9 @@ ErrorCode Parse(const std::string & str) */ ErrorCode Parse(const wchar_t * str) { - std::string temp; - Misc::AssignString(temp, str); + Misc::AssignString(wide_to_ansi, str); -return Parse(temp.c_str()); +return Parse(wide_to_ansi.c_str()); }