diff --git a/CHANGELOG.md b/CHANGELOG.md index 8eefa64069..8a97b3be64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * FIXED: Newer clang warns on `sprintf` which becomes a compilation error (due to `Werror`) so we use `snprintf` instead [#3846](https://github.com/valhalla/valhalla/issues/3846) * FIXED: Build all of Mjolnir with -Werror [#3845](https://github.com/valhalla/valhalla/pull/3845) * FIXED: Only set most destination information once for all origins in timedistancematrix [#3830](https://github.com/valhalla/valhalla/pull/3830) + * FIXED: Integers to expansion JSON output were cast wrongly [#3857](https://github.com/valhalla/valhalla/pull/3857) * **Enhancement** * ADDED: Added has_toll, has_higway, has_ferry tags to summary field of a leg and route and a highway tag to a maneuver if it includes a highway. [#3815](https://github.com/valhalla/valhalla/issues/3815) * ADDED: Add time info to sources_to_targets [#3795](https://github.com/valhalla/valhalla/pull/3795) diff --git a/src/thor/expansion_action.cc b/src/thor/expansion_action.cc index 80d7ee43ac..bed9d30ff0 100644 --- a/src/thor/expansion_action.cc +++ b/src/thor/expansion_action.cc @@ -103,19 +103,19 @@ std::string thor_worker_t::expansion(Api& request) { Pointer(kPropPaths[Options_ExpansionProperties_durations]) .Get(dom) ->GetArray() - .PushBack(Value{}.SetInt(static_cast(duration)), a); + .PushBack(Value{}.SetUint(static_cast(duration)), a); } if (exp_props.count(Options_ExpansionProperties_distances)) { Pointer(kPropPaths[Options_ExpansionProperties_distances]) .Get(dom) ->GetArray() - .PushBack(Value{}.SetInt(distance), a); + .PushBack(Value{}.SetUint(distance), a); } if (exp_props.count(Options_ExpansionProperties_costs)) { Pointer(kPropPaths[Options_ExpansionProperties_costs]) .Get(dom) ->GetArray() - .PushBack(Value{}.SetInt(static_cast(cost)), a); + .PushBack(Value{}.SetUint(static_cast(cost)), a); } if (exp_props.count(Options_ExpansionProperties_statuses)) Pointer(kPropPaths[Options_ExpansionProperties_statuses]) @@ -126,7 +126,7 @@ std::string thor_worker_t::expansion(Api& request) { Pointer(kPropPaths[Options_ExpansionProperties_edge_ids]) .Get(dom) ->GetArray() - .PushBack(Value{}.SetInt(static_cast(edgeid)), a); + .PushBack(Value{}.SetUint64(static_cast(edgeid)), a); }; // tell all the algorithms how to track expansion