Skip to content

Commit

Permalink
fix LONG_PTR
Browse files Browse the repository at this point in the history
  • Loading branch information
levinsv committed Feb 6, 2024
1 parent 2d7ac60 commit 9f3cfac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ctl/ctlSQLBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,7 @@ CharacterRange ctlSQLBox::RegexFindText(int minPos, int maxPos, const wxString &
ft.lpstrText = (char *)(const char *)buf;

//
if (SendMsg(2150, wxSTC_FIND_REGEXP, (LONG_PTR)&ft) == -1)
if (SendMsg(2150, wxSTC_FIND_REGEXP, (std::uintptr_t)&ft) == -1)
{
ft.chrgText.cpMin = -1;
ft.chrgText.cpMax = -1;
Expand Down
22 changes: 11 additions & 11 deletions ogl/composit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ void wxCompositeShape::Copy(wxShape &copy)
wxCompositeShape &compositeCopy = (wxCompositeShape &) copy;

// Associate old and new copies for compositeCopying constraints and division geometry
oglObjectCopyMapping.Append((LONG_PTR)this, &compositeCopy);
oglObjectCopyMapping.Append((std::uintptr_t)this, &compositeCopy);

// Copy the children
wxNode *node = m_children.GetFirst();
Expand All @@ -352,7 +352,7 @@ void wxCompositeShape::Copy(wxShape &copy)
if (m_divisions.Member(object))
compositeCopy.m_divisions.Append(newObject);

oglObjectCopyMapping.Append((LONG_PTR)object, newObject);
oglObjectCopyMapping.Append((std::uintptr_t)object, newObject);

node = node->GetNext();
}
Expand All @@ -363,14 +363,14 @@ void wxCompositeShape::Copy(wxShape &copy)
{
wxOGLConstraint *constraint = (wxOGLConstraint *)node->GetData();

wxShape *newConstraining = (wxShape *)(oglObjectCopyMapping.Find((LONG_PTR)constraint->m_constrainingObject)->GetData());
wxShape *newConstraining = (wxShape *)(oglObjectCopyMapping.Find((std::uintptr_t)constraint->m_constrainingObject)->GetData());

wxList newConstrainedList;
wxNode *node2 = constraint->m_constrainedObjects.GetFirst();
while (node2)
{
wxShape *constrainedObject = (wxShape *)node2->GetData();
wxShape *newConstrained = (wxShape *)(oglObjectCopyMapping.Find((LONG_PTR)constrainedObject)->GetData());
wxShape *newConstrained = (wxShape *)(oglObjectCopyMapping.Find((std::uintptr_t)constrainedObject)->GetData());
newConstrainedList.Append(newConstrained);
node2 = node2->GetNext();
}
Expand All @@ -393,19 +393,19 @@ void wxCompositeShape::Copy(wxShape &copy)
while (node)
{
wxDivisionShape *division = (wxDivisionShape *)node->GetData();
wxNode *node1 = oglObjectCopyMapping.Find((LONG_PTR)division);
wxNode *node1 = oglObjectCopyMapping.Find((std::uintptr_t)division);
wxNode *leftNode = NULL;
wxNode *topNode = NULL;
wxNode *rightNode = NULL;
wxNode *bottomNode = NULL;
if (division->GetLeftSide())
leftNode = oglObjectCopyMapping.Find((LONG_PTR)division->GetLeftSide());
leftNode = oglObjectCopyMapping.Find((std::uintptr_t)division->GetLeftSide());
if (division->GetTopSide())
topNode = oglObjectCopyMapping.Find((LONG_PTR)division->GetTopSide());
topNode = oglObjectCopyMapping.Find((std::uintptr_t)division->GetTopSide());
if (division->GetRightSide())
rightNode = oglObjectCopyMapping.Find((LONG_PTR)division->GetRightSide());
rightNode = oglObjectCopyMapping.Find((std::uintptr_t)division->GetRightSide());
if (division->GetBottomSide())
bottomNode = oglObjectCopyMapping.Find((LONG_PTR)division->GetBottomSide());
bottomNode = oglObjectCopyMapping.Find((std::uintptr_t)division->GetBottomSide());
if (node1)
{
wxDivisionShape *newDivision = (wxDivisionShape *)node1->GetData();
Expand Down Expand Up @@ -1728,8 +1728,8 @@ void wxDivisionShape::PopupMenu(double x, double y)
wxClientDC dc(GetCanvas());
GetCanvas()->PrepareDC(dc);

int mouse_x = (int)(dc.LogicalToDeviceX((LONG_PTR)(x - x1 * unit_x)));
int mouse_y = (int)(dc.LogicalToDeviceY((LONG_PTR)(y - y1 * unit_y)));
int mouse_x = (int)(dc.LogicalToDeviceX((std::uintptr_t)(x - x1 * unit_x)));
int mouse_y = (int)(dc.LogicalToDeviceY((std::uintptr_t)(y - y1 * unit_y)));

m_canvas->PopupMenu(oglPopupDivisionMenu, mouse_x, mouse_y);
delete oglPopupDivisionMenu;
Expand Down

0 comments on commit 9f3cfac

Please sign in to comment.