-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.48..v0.2.49 changeset MergeNearbyNodes.cpp
Garret Voltz edited this page Oct 2, 2019
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/ops/MergeNearbyNodes.cpp b/hoot-core/src/main/cpp/hoot/core/ops/MergeNearbyNodes.cpp
index a3312a7..0082c42 100644
--- a/hoot-core/src/main/cpp/hoot/core/ops/MergeNearbyNodes.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/ops/MergeNearbyNodes.cpp
@@ -69,6 +69,12 @@ MergeNearbyNodes::MergeNearbyNodes(Meters distance)
if (_distance < 0.0)
{
_distance = ConfigOptions().getMergeNearbyNodesDistance();
+ if (_distance <= 0.0)
+ {
+ throw IllegalArgumentException(
+ "Nearby node merging distance must be greater than zero. Distance specified: " +
+ QString::number(_distance));
+ }
}
}