Skip to content

Commit

Permalink
remove destination/srouces length <= coordinates length check
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshkaj committed Dec 4, 2018
1 parent f978900 commit 4655fcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Table:
- CHANGED: switch to pre-calculated distances for table responses for large speedup and 10% memory increase. [#5251](https://github.com/Project-OSRM/osrm-backend/pull/5251)
- ADDED: new parameter `fallback_speed` which will fill `null` cells with estimated value [#5257](https://github.com/Project-OSRM/osrm-backend/pull/5257)
- CHANGED: Remove API check for matrix sources/destination length to be less than or equal to coordinates length. [#5298](#https://github.com/Project-OSRM/osrm-backend/pull/5289)
- Features:
- ADDED: direct mmapping of datafiles is now supported via the `--mmap` switch. [#5242](https://github.com/Project-OSRM/osrm-backend/pull/5242)
- REMOVED: the previous `--memory_file` switch is now deprecated and will fallback to `--mmap` [#5242](https://github.com/Project-OSRM/osrm-backend/pull/5242)
Expand Down
9 changes: 1 addition & 8 deletions include/engine/api/table_parameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,7 @@ struct TableParameters : public BaseParameters

// 1/ The user is able to specify duplicates in srcs and dsts, in that case it's their fault

// 2/ len(srcs) and len(dsts) smaller or equal to len(locations)
if (sources.size() > coordinates.size())
return false;

if (destinations.size() > coordinates.size())
return false;

// 3/ 0 <= index < len(locations)
// 2/ 0 <= index < len(locations)
const auto not_in_range = [this](const std::size_t x) { return x >= coordinates.size(); };

if (std::any_of(begin(sources), end(sources), not_in_range))
Expand Down

0 comments on commit 4655fcb

Please sign in to comment.