- Timestamp:
- 2009-11-14T18:33:15+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
r2442 r2449 471 471 return ret; 472 472 } 473 QBLevel nextNode() 474 { 475 if (this.isLeaf()) 476 return this.nextSibling(); 477 return this.firstChild(); 478 } 473 479 QBLevel nextContentNode() 474 480 { 475 QBLevel next = this; 476 if (this.isLeaf()) { 477 next = this.nextSibling(); 478 } 481 QBLevel next = this.nextNode(); 479 482 if (next == null) 480 return null; 481 // Walk back down the tree and find the first leaf 482 while (!next.isLeaf()) { 483 QBLevel child; 484 if (next.hasContent() && next != this) { 485 break; 486 } 487 child = next.firstChild(); 488 if (debug) { 489 out("["+next.level+"] next node ("+next+") is a branch (content: "+next.hasContent()+"), moving down..."); 490 } 491 if (child == null) { 492 abort("branch node ("+this+" "+next.isLeaf()+") had no children (content: "+next.content+") this: " + this); 493 } 494 next = child; 495 } 496 return next; 483 return next; 484 if (next.hasContent()) 485 return next; 486 return next.nextContentNode(); 497 487 } 498 488 int size()
Note:
See TracChangeset
for help on using the changeset viewer.