845 : unnecassary return deleted (#856)

This commit is contained in:
kanwarpreet25 2019-02-17 02:23:06 +05:30 committed by Ilkka Seppälä
parent eafe52e17a
commit b6b4602baf

View File

@ -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)) {