Fix fallback speed validity checks (#5300)

* fix fallback_speeds check to only accept values > 0

* add invalid_fallback_speed
This commit is contained in:
Kajari Ghosh
2018-12-10 14:53:30 -05:00
parent bcdc689ae9
commit ec6c10661f
9 changed files with 157 additions and 75 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ struct TableParameters : public BaseParameters
{
std::vector<std::size_t> sources;
std::vector<std::size_t> destinations;
double fallback_speed = 0;
double fallback_speed = INVALID_FALLBACK_SPEED;
enum class FallbackCoordinateType
{
@@ -137,7 +137,7 @@ struct TableParameters : public BaseParameters
if (std::any_of(begin(destinations), end(destinations), not_in_range))
return false;
if (fallback_speed < 0)
if (fallback_speed <= 0)
return false;
if (scale_factor <= 0)