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:
parent
da730d1c70
commit
adc5015ad9
|
@ -432,6 +432,12 @@ VariablesTable variables_table;
|
||||||
CGamma<ValueType> cgamma;
|
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
|
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)
|
ErrorCode Parse(const wchar_t * str)
|
||||||
{
|
{
|
||||||
std::string temp;
|
Misc::AssignString(wide_to_ansi, str);
|
||||||
Misc::AssignString(temp, str);
|
|
||||||
|
|
||||||
return Parse(temp.c_str());
|
return Parse(wide_to_ansi.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue