summaryrefslogtreecommitdiffstats
path: root/src/libavoid
diff options
context:
space:
mode:
Diffstat (limited to 'src/libavoid')
-rw-r--r--src/libavoid/CMakeLists.txt54
-rw-r--r--src/libavoid/orthogonal.cpp2
-rw-r--r--src/libavoid/vpsc.cpp2
-rw-r--r--src/libavoid/vpsc.h7
4 files changed, 43 insertions, 22 deletions
diff --git a/src/libavoid/CMakeLists.txt b/src/libavoid/CMakeLists.txt
index 3f408074c..de067833b 100644
--- a/src/libavoid/CMakeLists.txt
+++ b/src/libavoid/CMakeLists.txt
@@ -1,19 +1,37 @@
-SET(libavoid_SRC
-connector.cpp
-geometry.cpp
-graph.cpp
-makepath.cpp
-polyutil.cpp
-region.cpp
-router.cpp
-shape.cpp
-static.cpp
-timer.cpp
-vertices.cpp
-visibility.cpp
-orthogonal.cpp
-vpsc.cpp
+
+set(libavoid_SRC
+ connector.cpp
+ geometry.cpp
+ geomtypes.cpp
+ graph.cpp
+ makepath.cpp
+ orthogonal.cpp
+ router.cpp
+ shape.cpp
+ timer.cpp
+ vertices.cpp
+ viscluster.cpp
+ visibility.cpp
+ vpsc.cpp
+
+ # -------
+ # Headers
+ assertions.h
+ connector.h
+ debug.h
+ geometry.h
+ geomtypes.h
+ graph.h
+ libavoid.h
+ makepath.h
+ orthogonal.h
+ router.h
+ shape.h
+ timer.h
+ vertices.h
+ viscluster.h
+ visibility.h
+ vpsc.h
)
-ADD_LIBRARY(avoid STATIC ${libavoid_SRC})
-TARGET_LINK_LIBRARIES(avoid
-${INKSCAPE_LIBS}) \ No newline at end of file
+
+add_inkscape_lib(avoid_LIB "${libavoid_SRC}")
diff --git a/src/libavoid/orthogonal.cpp b/src/libavoid/orthogonal.cpp
index 4a7b0af2d..e0a30b246 100644
--- a/src/libavoid/orthogonal.cpp
+++ b/src/libavoid/orthogonal.cpp
@@ -1731,7 +1731,7 @@ static void buildOrthogonalChannelInfo(Router *router,
Polygon& displayRoute = (*curr)->displayRoute();
// Determine all line segments that we are interested in shifting.
// We don't consider the first or last segment of a path.
- for (size_t i = 1; i < displayRoute.size(); ++i)
+ for (size_t i = 1; i < displayRoute.size()-1; ++i)
{
if (displayRoute.ps[i - 1][dim] == displayRoute.ps[i][dim])
{
diff --git a/src/libavoid/vpsc.cpp b/src/libavoid/vpsc.cpp
index 19d360375..1646ddaaa 100644
--- a/src/libavoid/vpsc.cpp
+++ b/src/libavoid/vpsc.cpp
@@ -422,7 +422,7 @@ Constraint* IncSolver::mostViolated(Constraints &l) {
// downwards. There is always at least 1 element in the
// vector because of search.
// TODO check this logic and add parens:
- if((deletePoint != end) && ((minSlack < ZERO_UPPERBOUND) && !v->active || v->equality)) {
+ if((deletePoint != end) && (((minSlack < ZERO_UPPERBOUND) && !v->active) || v->equality)) {
*deletePoint = l[l.size()-1];
l.resize(l.size()-1);
}
diff --git a/src/libavoid/vpsc.h b/src/libavoid/vpsc.h
index 4d6d8ce61..da837c1f8 100644
--- a/src/libavoid/vpsc.h
+++ b/src/libavoid/vpsc.h
@@ -181,10 +181,13 @@ public:
const bool equality;
bool unsatisfiable;
};
-/*
+
+/**
* A block structure defined over the variables such that each block contains
* 1 or more variables, with the invariant that all constraints inside a block
- * are satisfied by keeping the variables fixed relative to one another
+ * are satisfied by keeping the variables fixed relative to one another.
+ *
+ * @todo check on this class being copy-n-paste duplicated.
*/
class Blocks : public std::set<Block*>
{