mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
fe3021b88a
get_cylinder(d, i) is more readable than d->cylinders.cylinders[i]. Moreover, it does bound checking and is more flexible with respect to changing the core data structures. Most places already used this accessor, but some still accessed the cylinders directly. This patch unifies the accesses by consistently switching to get_cylinder(). The affected code is in C++ and accesses the cylinder as reference or object, whereas the get_cylinder() function is C and returns a pointer. This results in funky looking "*get_cylinder(d, i)" expressions. Arguably still better than the original. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
command.cpp | ||
command.h | ||
command_base.cpp | ||
command_base.h | ||
command_divelist.cpp | ||
command_divelist.h | ||
command_divesite.cpp | ||
command_divesite.h | ||
command_edit.cpp | ||
command_edit.h | ||
command_edit_trip.cpp | ||
command_edit_trip.h | ||
command_event.cpp | ||
command_event.h | ||
command_pictures.cpp | ||
command_pictures.h |