2. VC project, CPU still 50% overload.
I found here, is not change:
- else if ( wxIsalpha(current.GetChar(0))
- && ( (m_Tokenizer.PeekToken() == ParserConsts::semicolon)
- || (m_Tokenizer.PeekToken() == ParserConsts::comma)) )
+ else if ((wxIsalpha(current.GetChar(0)) || current.GetChar(0) == '_') )
{
TRACE(_T("ReadClsNames() : Adding variable '%s' as '%s' to '%s'"),
current.wx_str(),
@@ -2014,6 +2013,7 @@
m_Tokenizer.UngetToken();
break;
}
+
The code here looks not applied. If you modify the code here, it can solve the CPU overload.and here:
else if (
token == _T("*"))
{
m_IsPointer = false;
continue;
}
else if (peek == ParserConsts::comma)
{
m_Tokenizer.UngetToken();
if (components.size() != 0)
{
wxString ancestor;
while (components.size() > 0)
{
wxString token = components.front();
components.pop();
if (!ancestor.IsEmpty())
ancestor << _T(' ');
ancestor << token;
}
ReadClsNames(ancestor);
}
token variables at different scope, readability is not good.[attachment deleted by admin]