valhalla
valhalla copied to clipboard
Cast from UInt64 to Int could be problematic on macOS
https://github.com/valhalla/valhalla/blob/5b3cd9704ffd699b992b08bc4a5bf60e34d318f5/src/tyr/serializers.cc#L442
num_lanes_blocked is defined as UInt64, writer writes Int. This gives an compiler error on default build configuration.
it likely depends on your platform and compiler, as you can see our builds complete without issue. in practice, its highly unlikely that this matters. no roads that i know about have more than 2^31 lanes, so the number wouldnt wrap around on the signed integer conversion. that said, you are right that we should fix it. it looks like there are a number of places where we just use Int
without looking at the sign :frowning_face: do you have time to submit a pr?
@kevinkreiser If it's open, can I pick this issue ?
feel free:)