mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-13 20:14:59 +00:00
845 : unnecassary return deleted (#856)
This commit is contained in:
1 parent
eafe52e17a
commit
b6b4602baf
1 file changed
+1
-4
@@ -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)) {
|
||||||
|
|||||||
Reference in new issue
Block a user