small optimization in Parser::Parse(const wchar_t *)

git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@194 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2009-09-13 19:29:29 +00:00
parent da730d1c70
commit adc5015ad9
1 changed files with 8 additions and 3 deletions

View File

@ -432,6 +432,12 @@ VariablesTable variables_table;
CGamma<ValueType> 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());
}