summaryrefslogtreecommitdiffstats
path: root/src/removeoverlap/constraint.cpp
diff options
context:
space:
mode:
authorTim Dwyer <tgdwyer@gmail.com>2006-01-26 05:32:20 +0000
committertgdwyer <tgdwyer@users.sourceforge.net>2006-01-26 05:32:20 +0000
commitbd5d4e5d36392293eeb966cfdf4b68cca2099a9f (patch)
tree844ef674a2ce640ced96538258264f1e5003535c /src/removeoverlap/constraint.cpp
parentfix silly bug - was unable to flip by scaling (diff)
downloadinkscape-bd5d4e5d36392293eeb966cfdf4b68cca2099a9f.tar.gz
inkscape-bd5d4e5d36392293eeb966cfdf4b68cca2099a9f.zip
Fixed bug to do with comparison of invalid constraints in pairing heaps.
Also numerical problem with constraint generation fixed. (bzr r30)
Diffstat (limited to 'src/removeoverlap/constraint.cpp')
-rw-r--r--src/removeoverlap/constraint.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/removeoverlap/constraint.cpp b/src/removeoverlap/constraint.cpp
index 78c5f03ad..23da81927 100644
--- a/src/removeoverlap/constraint.cpp
+++ b/src/removeoverlap/constraint.cpp
@@ -10,9 +10,12 @@
*/
#include "constraint.h"
-
+#include <cassert>
Constraint::Constraint(Variable *left, Variable *right, double gap)
{
+ if(gap>1e40) {
+ int i=0; // this would most probably indicate a divide by zero somewhere
+ }
this->left=left;
left->out.push_back(this);
this->right=right;