Commit 81751632 authored by Lorenzo Marcantonio's avatar Lorenzo Marcantonio

Better type safety to DANGLING_END_ITEM (SCH_ITEM* instead of void*)

parent c32f56ff
...@@ -85,7 +85,7 @@ class DANGLING_END_ITEM ...@@ -85,7 +85,7 @@ class DANGLING_END_ITEM
{ {
private: private:
/// A pointer to the connectable object. /// A pointer to the connectable object.
const void* m_item; const EDA_ITEM* m_item;
/// The position of the connection point. /// The position of the connection point.
wxPoint m_pos; wxPoint m_pos;
...@@ -94,7 +94,7 @@ private: ...@@ -94,7 +94,7 @@ private:
DANGLING_END_T m_type; DANGLING_END_T m_type;
public: public:
DANGLING_END_ITEM( DANGLING_END_T aType, const void* aItem, const wxPoint& aPosition ) DANGLING_END_ITEM( DANGLING_END_T aType, const EDA_ITEM* aItem, const wxPoint& aPosition )
{ {
m_item = aItem; m_item = aItem;
m_type = aType; m_type = aType;
...@@ -102,7 +102,7 @@ public: ...@@ -102,7 +102,7 @@ public:
} }
wxPoint GetPosition() const { return m_pos; } wxPoint GetPosition() const { return m_pos; }
const void* GetItem() const { return m_item; } const EDA_ITEM* GetItem() const { return m_item; }
DANGLING_END_T GetType() const { return m_type; } DANGLING_END_T GetType() const { return m_type; }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment