valhalla / valhalla

Open Source Routing Engine for OpenStreetMap
https://valhalla.github.io/valhalla/
Other
4.5k stars 681 forks source link

Improve exception safety with smart pointers #1462

Open elfring opened 6 years ago

elfring commented 6 years ago

Would you like to wrap any pointers with the class template “std::unique_ptr”?

kevinkreiser commented 6 years ago

help is always welcome, so we wouldn't be opposed to any cleanup that you'd like to have a go at! i will say that there is some trickiness in the code though. specifically the pointers within graphtile, for example, are pointing into a larger contiguous block of memory so they would at most need std::weak_ptr and maybe not need any smart pointer at all. at any rate, please feel free to update this issue with any specific parts of the code you'd like to cleanup and we'll let you know if there are any gotchas to look out for. thanks!