Code

Constructor cleaned up a bit.
authortgdwyer <tgdwyer@users.sourceforge.net>
Thu, 26 Jan 2006 05:48:38 +0000 (05:48 +0000)
committertgdwyer <tgdwyer@users.sourceforge.net>
Thu, 26 Jan 2006 05:48:38 +0000 (05:48 +0000)
src/removeoverlap/constraint.cpp

index 23da81927e6183a7ad94bfb9e9fa8760eaaed49e..e48775f8c594967e1b340fb5712377d13c941325 100644 (file)
 #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)
 {