From 4755c19fdcc318db10d26860a80c6855c71af722 Mon Sep 17 00:00:00 2001 From: Kajari Ghosh Date: Mon, 10 Dec 2018 15:56:31 -0500 Subject: [PATCH 1/2] check for scale_factor != 1 --- 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 64184190b63..bf1be8dd32d 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) + - FIX: only trigger `scale_factor` code to scan matrix when necessary. [#5302](https://github.com/Project-OSRM/osrm-backend/issues/5302) # 5.20.0 - Changes from 5.19.0: diff --git a/src/engine/plugins/table.cpp b/src/engine/plugins/table.cpp index 8dc76516880..f2de4244278 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++) { From 2c4af79dedbddc23c5848837ca326f68fa80b3d0 Mon Sep 17 00:00:00 2001 From: Kajari Ghosh Date: Mon, 10 Dec 2018 16:37:06 -0500 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf1be8dd32d..6197d690867 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +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) - - FIX: only trigger `scale_factor` code to scan matrix when necessary. [#5302](https://github.com/Project-OSRM/osrm-backend/issues/5302) + - 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: