../../../../src/plugins/codecompletion/nativeparser.cpp: In member function 'size_t NativeParser::FindAIMatches(Parser*, std::queue<ParserComponent, std::deque<ParserComponent, std::allocator<ParserComponent> > >, TokenIdxSet&, int, bool, bool, bool, short int, TokenIdxSet*)':
../../../../src/plugins/codecompletion/nativeparser.cpp:1379: error: no match for 'operator==' in 'itsearch == 0'
/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:285: note: candidates are: bool std::_Rb_tree_const_iterator<_Tp>::operator==(const std::_Rb_tree_const_iterator<_Tp>&) const [with _Tp = int]
/usr/local/include/wx-2.6/wx/string.h:1436: note: bool operator==(const wxString&, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1438: note: bool operator==(const wxString&, const wxChar*)
/usr/local/include/wx-2.6/wx/string.h:1440: note: bool operator==(const wxChar*, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1474: note: bool operator==(const wxString&, const wxWCharBuffer&)
/usr/local/include/wx-2.6/wx/string.h:1476: note: bool operator==(const wxWCharBuffer&, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1509: note: bool operator==(wxChar, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1510: note: bool operator==(const wxString&, wxChar)
/usr/local/include/wx-2.6/wx/longlong.h:916: note: bool operator==(long int, const wxLongLong&)
/usr/local/include/wx-2.6/wx/longlong.h:929: note: bool operator==(long unsigned int, const wxULongLong&)
/usr/local/include/wx-2.6/wx/treebase.h:84: note: bool operator==(const wxTreeItemId&, const wxTreeItemId&)
../../../src/sdk/tinyxml/tinystr.h:254: note: bool operator==(const TiXmlString&, const TiXmlString&)
../../../src/sdk/tinyxml/tinystr.h:269: note: bool operator==(const TiXmlString&, const char*)
../../../src/sdk/tinyxml/tinystr.h:270: note: bool operator==(const char*, const TiXmlString&)
../../../../src/plugins/codecompletion/nativeparser.cpp:1381: error: no match for 'operator!=' in 'itsearch != 0'
/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:289: note: candidates are: bool std::_Rb_tree_const_iterator<_Tp>::operator!=(const std::_Rb_tree_const_iterator<_Tp>&) const [with _Tp = int]
/usr/local/include/wx-2.6/wx/string.h:1442: note: bool operator!=(const wxString&, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1444: note: bool operator!=(const wxString&, const wxChar*)
/usr/local/include/wx-2.6/wx/string.h:1446: note: bool operator!=(const wxChar*, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1478: note: bool operator!=(const wxString&, const wxWCharBuffer&)
/usr/local/include/wx-2.6/wx/string.h:1480: note: bool operator!=(const wxWCharBuffer&, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1511: note: bool operator!=(wxChar, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1512: note: bool operator!=(const wxString&, wxChar)
/usr/local/include/wx-2.6/wx/longlong.h:917: note: bool operator!=(long int, const wxLongLong&)
/usr/local/include/wx-2.6/wx/longlong.h:930: note: bool operator!=(long unsigned int, const wxULongLong&)
/usr/local/include/wx-2.6/wx/treebase.h:89: note: bool operator!=(const wxTreeItemId&, const wxTreeItemId&)
../../../src/sdk/tinyxml/tinystr.h:264: note: bool operator!=(const TiXmlString&, const TiXmlString&)
../../../src/sdk/tinyxml/tinystr.h:271: note: bool operator!=(const TiXmlString&, const char*)
../../../src/sdk/tinyxml/tinystr.h:272: note: bool operator!=(const char*, const TiXmlString&)
../../../../src/plugins/codecompletion/nativeparser.cpp:1394: error: no match for 'operator==' in 'itsearch == 0'
/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:285: note: candidates are: bool std::_Rb_tree_const_iterator<_Tp>::operator==(const std::_Rb_tree_const_iterator<_Tp>&) const [with _Tp = int]
/usr/local/include/wx-2.6/wx/string.h:1436: note: bool operator==(const wxString&, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1438: note: bool operator==(const wxString&, const wxChar*)
/usr/local/include/wx-2.6/wx/string.h:1440: note: bool operator==(const wxChar*, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1474: note: bool operator==(const wxString&, const wxWCharBuffer&)
/usr/local/include/wx-2.6/wx/string.h:1476: note: bool operator==(const wxWCharBuffer&, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1509: note: bool operator==(wxChar, const wxString&)
/usr/local/include/wx-2.6/wx/string.h:1510: note: bool operator==(const wxString&, wxChar)
/usr/local/include/wx-2.6/wx/longlong.h:916: note: bool operator==(long int, const wxLongLong&)
/usr/local/include/wx-2.6/wx/longlong.h:929: note: bool operator==(long unsigned int, const wxULongLong&)
/usr/local/include/wx-2.6/wx/treebase.h:84: note: bool operator==(const wxTreeItemId&, const wxTreeItemId&)
../../../src/sdk/tinyxml/tinystr.h:254: note: bool operator==(const TiXmlString&, const TiXmlString&)
../../../src/sdk/tinyxml/tinystr.h:269: note: bool operator==(const TiXmlString&, const char*)
../../../src/sdk/tinyxml/tinystr.h:270: note: bool operator==(const char*, const TiXmlString&)
make[4]: *** [nativeparser.lo] Error 1
Index: nativeparser.cpp
===================================================================
--- nativeparser.cpp (revision 2898)
+++ nativeparser.cpp (working copy)
@@ -1396,11 +1396,10 @@
#endif
// search under all search-scope namespaces too
TokenIdxSet::iterator itsearch;
- if (search_scope)
- itsearch = search_scope->begin();
- while (itsearch == 0 || itsearch != search_scope->end())
+ itsearch = search_scope->begin();
+ while (itsearch != search_scope->end())
{
- Token* parent = tree->at(itsearch != 0 ? *itsearch : parentTokenIdx);
+ Token* parent = tree->at(*itsearch);
#ifdef DEBUG_CC_AI
Manager::Get()->GetMessageManager()->DebugLog(_T(" : looking under '%s'"), parent ? parent->m_Name.c_str() : _T("Global namespace"));
#endif
@@ -1413,8 +1412,6 @@
break;
parent = tree->at(parent->m_ParentIndex);
} while (true);
- if (itsearch == 0)
- break;
++itsearch;
}
// we got all possible types (hopefully should be just one)
It seems the patch works. However, I'm wondering what's the reason with using the code 'itsearch == 0'. I think many compiler can't support it. Maybe it's thinking of the search_scope could be NULL.