Code

Fixed crash when draw height was zero.
[inkscape.git] / src / libavoid / graph.h
index 080309d5271e779ef9f1eefa4ea70da60d67574b..c4de3df08d55dea3acb70de437612e475b2caed3 100644 (file)
@@ -27,7 +27,6 @@
 #include <cassert>
 #include <list>
 #include <utility>
-using std::pair;
 #include "libavoid/vertices.h"
 
 namespace Avoid {
@@ -45,15 +44,18 @@ class EdgeInf
     public:
         EdgeInf(VertInf *v1, VertInf *v2);
         ~EdgeInf();
-        double getDist(void);
+        inline double getDist(void)
+        {
+            return _dist;
+        }
         void setDist(double dist);
         void alertConns(void);
         void addConn(bool *flag);
         void addCycleBlocker(void);
         void addBlocker(int b);
-        bool hasBlocker(int b);
-        pair<VertID, VertID> ids(void);
-        pair<Point, Point> points(void);
+
+        std::pair<VertID, VertID> ids(void);
+        std::pair<Point, Point> points(void);
         void db_print(void);
         void checkVis(void);
         VertInf *otherVert(VertInf *vert);
@@ -63,6 +65,7 @@ class EdgeInf
 
         EdgeInf *lstPrev;
         EdgeInf *lstNext;
+        int _blocker;
     private:
         Router *_router;
         bool _added;
@@ -71,7 +74,6 @@ class EdgeInf
         VertInf *_v2;
         EdgeInfList::iterator _pos1;
         EdgeInfList::iterator _pos2;
-        ShapeList _blockers;
         FlagList  _conns;
         double  _dist;