Bug #18093 2011-05-04 11:54

dtg

Conversion from 'int' to 'const wxTreeItemId' is ambigous

Hi,

got the "Conversion from 'int' to 'const wxTreeItemId' is ambigous" error while trying to compile /trunk -r 7131

That patch fixes it:

Index: contrib/codesnippets/codesnippetstreectrl.cpp
===================================================================
--- contrib/codesnippets/codesnippetstreectrl.cpp       (revision 7131)
+++ contrib/codesnippets/codesnippetstreectrl.cpp       (working copy)
@@ -94,7 +94,7 @@
     m_mimeDatabase = 0;
     m_bBeginInternalDrag = false;
     m_LastXmlModifiedTime = time_t(0);            //2009/03/15
-    m_itemAtKeyUp = m_itemAtKeyDown = 0;
+    m_itemAtKeyUp = m_itemAtKeyDown = 0L;
 
 
     m_pSnippetsTreeCtrl = this;
@@ -1070,8 +1070,8 @@
     }
 
     delete pDoc; pDoc = 0;
-    m_itemAtKeyDown = 0;
-    m_itemAtKeyUp = 0;
+    m_itemAtKeyDown = 0L;
+    m_itemAtKeyUp = 0L;
 
     return;
 
@@ -1291,8 +1291,8 @@
     delete textData; //wxTextDataObject
     delete fileData; //wxFileDataObject
     m_TreeText = wxEmptyString;
-    m_itemAtKeyDown = 0;
-    m_itemAtKeyUp = 0;
+    m_itemAtKeyDown = 0L;
+    m_itemAtKeyUp = 0L;
 
 }
 //// ----------------------------------------------------------------------------
@@ -1403,7 +1403,7 @@
     m_MouseUpX = event.GetPoint().x;
     m_MouseUpY = event.GetPoint().y;
 
-    m_itemAtKeyUp = 0;
+    m_itemAtKeyUp = 0L;
     int hitFlags = 0;
     wxTreeItemId id = HitTest(wxPoint(m_MouseUpX, m_MouseUpY), hitFlags);
     if (id.IsOk() and (hitFlags & (wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL )))
Index: contrib/codesnippets/codesnippets.cpp
===================================================================
--- contrib/codesnippets/codesnippets.cpp       (revision 7131)
+++ contrib/codesnippets/codesnippets.cpp       (working copy)
@@ -106,7 +106,7 @@
     m_pDragCursor = false;
     m_MouseDownX = m_MouseDownY = 0;
     m_MouseUpX = m_MouseUpY = 0;
-    m_prjTreeItemAtKeyUp = m_prjTreeItemAtKeyDown= 0;
+    m_prjTreeItemAtKeyUp = m_prjTreeItemAtKeyDown= 0L;
     m_bMouseExitedWindow = false;
     m_bBeginInternalDrag = false;
     m_pDragCursor = new wxCursor(wxCURSOR_HAND);
@@ -1240,8 +1240,8 @@
     m_MouseDownX = event.GetX();
     m_MouseDownY = event.GetY();
 
-    m_prjTreeItemAtKeyDown = 0;
-    m_prjTreeItemAtKeyUp = 0;
+    m_prjTreeItemAtKeyDown = 0L;
+    m_prjTreeItemAtKeyUp = 0L;
     int hitFlags = 0;
 
     wxTreeCtrl* pTree = (wxTreeCtrl*)event.GetEventObject();
@@ -1270,7 +1270,7 @@
     m_MouseUpX = event.GetX();
     m_MouseUpY = event.GetY();
 
-    m_prjTreeItemAtKeyUp = 0;
+    m_prjTreeItemAtKeyUp = 0L;
     int hitFlags = 0;
 
     wxTreeCtrl* pTree = (wxTreeCtrl*)event.GetEventObject();
@@ -1446,8 +1446,8 @@
     delete textData; //wxTextDataObject
     delete fileData; //wxFileDataObject
     m_TreeText = wxEmptyString;
-    m_prjTreeItemAtKeyDown = 0;
-    m_prjTreeItemAtKeyUp = 0;
+    m_prjTreeItemAtKeyDown = 0L;
+    m_prjTreeItemAtKeyUp = 0L;
 
     // correct for treeCtrl bug
     SendMouseLeftUp(pTree, m_MouseDownX, m_MouseDownY);
Category
Compiler
Group
 
Status
Open
Close date
 
Assigned to
tpetrov
tpetrov 2011-07-04 23:13

Here http://forums.codeblocks.org/index.php/topic,14430.0.html we've discussed this problem. There is a patch, but it was not committed.