summaryrefslogtreecommitdiffstats
path: root/src/removeoverlap
diff options
context:
space:
mode:
Diffstat (limited to 'src/removeoverlap')
-rw-r--r--src/removeoverlap/constraint.h4
-rw-r--r--src/removeoverlap/generate-constraints.cpp2
-rwxr-xr-xsrc/removeoverlap/remove_rectangle_overlap.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/removeoverlap/constraint.h b/src/removeoverlap/constraint.h
index 683d66da3..c8273376b 100644
--- a/src/removeoverlap/constraint.h
+++ b/src/removeoverlap/constraint.h
@@ -37,11 +37,11 @@ static inline bool compareConstraints(Constraint *const &l, Constraint *const &r
double const sl =
l->left->block->timeStamp > l->timeStamp
||l->left->block==l->right->block
- ?DBL_MIN:l->slack();
+ ?-DBL_MAX:l->slack();
double const sr =
r->left->block->timeStamp > r->timeStamp
||r->left->block==r->right->block
- ?DBL_MIN:r->slack();
+ ?-DBL_MAX:r->slack();
if(sl==sr) {
// arbitrary choice based on id
if(l->left->id==r->left->id) {
diff --git a/src/removeoverlap/generate-constraints.cpp b/src/removeoverlap/generate-constraints.cpp
index efa477449..a8bfe28e7 100644
--- a/src/removeoverlap/generate-constraints.cpp
+++ b/src/removeoverlap/generate-constraints.cpp
@@ -140,7 +140,7 @@ Event **events;
int compare_events(const void *a, const void *b) {
Event *ea=*(Event**)a;
Event *eb=*(Event**)b;
- if(ea->v->r==ea->v->r) {
+ if(ea->v->r==eb->v->r) {
// when comparing opening and closing from the same rect
// open must come first
if(ea->type==Open) return -1;
diff --git a/src/removeoverlap/remove_rectangle_overlap.cpp b/src/removeoverlap/remove_rectangle_overlap.cpp
index 34cedf481..9f98d5811 100755
--- a/src/removeoverlap/remove_rectangle_overlap.cpp
+++ b/src/removeoverlap/remove_rectangle_overlap.cpp
@@ -6,7 +6,7 @@
#include "constraint.h"
#ifdef RECTANGLE_OVERLAP_LOGGING
#include <fstream>
-#include <blocks.h>
+#include "blocks.h"
using std::ios;
using std::ofstream;
using std::endl;