When build CC, I find some un-used variables, like:
size_t NativeParser::ResolveActualType(wxString searchText, const TokenIdxSet& searchScope, TokenIdxSet& result)
{
// break up the search text for next analysis.
std::queue<ParserComponent> typeComponents;
BreakUpComponents(searchText, typeComponents);
if (!typeComponents.empty())
{
TokenIdxSet initialScope;
if (!searchScope.empty())
initialScope = searchScope;
else
initialScope.insert(-1);
TokensTree* tree = m_Parser->GetTokensTree(); // accessed by GenerateResultSet
CC_LOCKER_TRACK_TT_MTX_LOCK(s_TokensTreeMutex)
while (!typeComponents.empty())
{
TokenIdxSet initialResult;
ParserComponent component = typeComponents.front();
typeComponents.pop();
wxString actualTypeStr = component.component;
// All functions that call the recursive GenerateResultSet should already entered a critical section.
GenerateResultSet(actualTypeStr, initialScope, initialResult, true, false, 0xFFFF);
if (!initialResult.empty())
{
initialScope.clear();
for (TokenIdxSet::iterator it = initialResult.begin(); it != initialResult.end(); ++it)
// TODO (blueshake#1#): eclimate the variable/function
initialScope.insert(*it);
}
else
{
initialScope.clear();
break;
}
}
CC_LOCKER_TRACK_TT_MTX_UNLOCK(s_TokensTreeMutex)
if (!initialScope.empty())
result = initialScope;
}
return result.size();
}
What does this means? comments is still confusing.
TokensTree* tree = m_Parser->GetTokensTree(); // accessed by GenerateResultSet