ethz-asl / grid_map_geo

Geolocalization for grid map using GDAL.
BSD 3-Clause "New" or "Revised" License
141 stars 19 forks source link

Use std::array over raw array for transforms #48

Closed Ryanf55 closed 9 months ago

Ryanf55 commented 9 months ago

Purpose

std::array has more compile time safety and carries the length with the object over a raw array.

Risk

None

Ryanf55 commented 9 months ago

Awesome, thanks!

Reminder to self: We would probably want to backport this to ROS1

Since std::array was added in C++11, I would go as far to say the GDAL C++ API for transforms should have an overload. I can submit a patch to see if they take it. The advantages of compile time length aren't truly found till it's used though the whole calling function.