Skip to content

Commit b6b4602

Browse files
kanwarpreet25iluwatar
authored andcommitted
845 : unnecassary return deleted (iluwatar#856)
1 parent eafe52e commit b6b4602

File tree

1 file changed

+1
-4
lines changed
  • spatial-partition/src/main/java/com/iluwatar/spatialpartition

1 file changed

+1
-4
lines changed

spatial-partition/src/main/java/com/iluwatar/spatialpartition/QuadTree.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,13 @@ public class QuadTree {
5555
}
5656

5757
void insert(Point p) {
58-
if (!this.boundary.contains(p)) {
59-
return;
60-
} else {
58+
if (this.boundary.contains(p)) {
6159
if (this.points.size() < this.capacity) {
6260
points.put(p.id, p);
6361
} else {
6462
if (!this.divided) {
6563
this.divide();
6664
}
67-
6865
if (this.northwest.boundary.contains(p)) {
6966
this.northwest.insert(p);
7067
} else if (this.northeast.boundary.contains(p)) {

0 commit comments

Comments
 (0)