Code

Change to the way timestamps are used. Should now be more efficient.
authortgdwyer <tgdwyer@users.sourceforge.net>
Wed, 25 Jan 2006 02:01:23 +0000 (02:01 +0000)
committertgdwyer <tgdwyer@users.sourceforge.net>
Wed, 25 Jan 2006 02:01:23 +0000 (02:01 +0000)
src/removeoverlap/block.cpp
src/removeoverlap/blocks.cpp

index 799fa5d8e07a83be69ee70041fa642074468bfbb..32b310153e7f3e02dcfb2568ec70b82c447e8ec2 100644 (file)
@@ -129,14 +129,12 @@ Constraint *Block::findMinInConstraint() {
 #ifdef RECTANGLE_OVERLAP_LOGGING
                        f<<" ... skipping internal constraint"<<endl;
 #endif
-               } else if(lb->timeStamp > rb->timeStamp 
-                       && v->timeStamp < lb->timeStamp 
-                       || v->timeStamp < rb->timeStamp) {
+               } else if(v->timeStamp < lb->timeStamp) {
                        // block at other end of constraint has been moved since this
                        in->deleteMin();
                        outOfDate.push_back(v);
 #ifdef RECTANGLE_OVERLAP_LOGGING
-                       f<<"    reinserting out of date constraint"<<endl;
+                       f<<"    reinserting out of date (reinsert later)"<<endl;
 #endif
                } else {
                        break;
index 45c47918716d6047d588d48b7a379277c334baf6..23df605160f0213c2c3422a75483751569101a55 100644 (file)
@@ -96,9 +96,10 @@ void Blocks::mergeLeft(Block *r) {
                        dist=-dist;
                        std::swap(l, r);
                }
+               blockTimeCtr++;
                r->merge(l, c, dist);
                r->mergeIn(l);
-               r->timeStamp=++blockTimeCtr;
+               r->timeStamp=blockTimeCtr;
                removeBlock(l);
                c=r->findMinInConstraint();
        }