From d89a513183bec10b8cd5f55886fdcba43bb45258 Mon Sep 17 00:00:00 2001 From: Kajari Ghosh Date: Mon, 10 Dec 2018 17:11:08 -0500 Subject: [PATCH] Fix scale_factor bug (#5303) * check for scale_factor != 1 * changelog --- CHANGELOG.md | 1 + src/engine/plugins/table.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f57d69723..7721c4e7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - ADDED: all waypoints in responses now contain a distance property between the original coordinate and the snapped location. [#5255](https://github.com/Project-OSRM/osrm-backend/pull/5255) - Table: - ADDED: new parameter `scale_factor` which will scale the cell `duration` values by this factor. [#5298](https://github.com/Project-OSRM/osrm-backend/pull/5298) + - FIXED: only trigger `scale_factor` code to scan matrix when necessary. [#5303](https://github.com/Project-OSRM/osrm-backend/pull/5303) # 5.20.0 - Changes from 5.19.0: diff --git a/src/engine/plugins/table.cpp b/src/engine/plugins/table.cpp index 8dc765168..f2de42442 100644 --- a/src/engine/plugins/table.cpp +++ b/src/engine/plugins/table.cpp @@ -96,7 +96,7 @@ Status TablePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms, } // Scan table for null results - if any exist, replace with distance estimates - if (params.fallback_speed != INVALID_FALLBACK_SPEED || params.scale_factor > 0) + if (params.fallback_speed != INVALID_FALLBACK_SPEED || params.scale_factor != 1) { for (std::size_t row = 0; row < num_sources; row++) {