summaryrefslogtreecommitdiffstats
path: root/src/removeoverlap/constraint.cpp
diff options
context:
space:
mode:
authorTim Dwyer <tgdwyer@gmail.com>2006-01-26 05:48:38 +0000
committertgdwyer <tgdwyer@users.sourceforge.net>2006-01-26 05:48:38 +0000
commit79e922f579a6972f2c3f85f6cc757ba15f987115 (patch)
tree73d0f58b9e5d92b56bfffe7707b6ef6865d8954e /src/removeoverlap/constraint.cpp
parentFixed bug to do with comparison of invalid constraints in pairing heaps. (diff)
downloadinkscape-79e922f579a6972f2c3f85f6cc757ba15f987115.tar.gz
inkscape-79e922f579a6972f2c3f85f6cc757ba15f987115.zip
Constructor cleaned up a bit.
(bzr r31)
Diffstat (limited to 'src/removeoverlap/constraint.cpp')
-rw-r--r--src/removeoverlap/constraint.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/removeoverlap/constraint.cpp b/src/removeoverlap/constraint.cpp
index 23da81927..e48775f8c 100644
--- a/src/removeoverlap/constraint.cpp
+++ b/src/removeoverlap/constraint.cpp
@@ -12,18 +12,15 @@
#include "constraint.h"
#include <cassert>
Constraint::Constraint(Variable *left, Variable *right, double gap)
+: left(left),
+ right(right),
+ gap(gap),
+ timeStamp(0),
+ active(false),
+ visited(false)
{
- 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;
right->in.push_back(this);
- this->gap=gap;
- active=false;
- visited=false;
- timeStamp=0;
}
std::ostream& operator <<(std::ostream &os, const Constraint &c)
{