845 : unnecassary return deleted (#856)
This commit is contained in:
parent
eafe52e17a
commit
b6b4602baf
@ -55,16 +55,13 @@ public class QuadTree {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void insert(Point p) {
|
void insert(Point p) {
|
||||||
if (!this.boundary.contains(p)) {
|
if (this.boundary.contains(p)) {
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
if (this.points.size() < this.capacity) {
|
if (this.points.size() < this.capacity) {
|
||||||
points.put(p.id, p);
|
points.put(p.id, p);
|
||||||
} else {
|
} else {
|
||||||
if (!this.divided) {
|
if (!this.divided) {
|
||||||
this.divide();
|
this.divide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.northwest.boundary.contains(p)) {
|
if (this.northwest.boundary.contains(p)) {
|
||||||
this.northwest.insert(p);
|
this.northwest.insert(p);
|
||||||
} else if (this.northeast.boundary.contains(p)) {
|
} else if (this.northeast.boundary.contains(p)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user