subsurface/commands
Berthold Stoeger fe3021b88a cleanup: consistently use get_cylinder() accessor
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>
2020-08-21 08:48:22 -07:00
..
CMakeLists.txt undo: implement undo of setting a picture time by drag&drop 2020-05-06 13:58:09 -07:00
command.cpp undo: make adding of pictures undoable 2020-05-06 13:58:09 -07:00
command.h undo: make adding of pictures undoable 2020-05-06 13:58:09 -07:00
command_base.cpp undo infrastructure: improve undo command texts 2020-03-10 09:25:57 -07:00
command_base.h cleanup: move dive_table from dive.h to divelist.h 2020-05-01 09:42:31 -07:00
command_divelist.cpp selection: add selection flag for trips 2020-05-03 15:02:21 -07:00
command_divelist.h Cleanup: use getDiveSelection() for shifting time 2020-03-06 10:00:13 +01:00
command_divesite.cpp translations: qualify tr function to get correct context 2020-03-22 12:02:48 -07:00
command_divesite.h undo: implement ApplyGPSFixes undo command 2020-03-09 12:41:57 -07:00
command_edit.cpp cleanup: consistently use get_cylinder() accessor 2020-08-21 08:48:22 -07:00
command_edit.h undo: more fine-grained editing of cylinder 2020-04-07 00:13:35 +02:00
command_edit_trip.cpp translations: qualify tr function to get correct context 2020-03-22 12:02:48 -07:00
command_edit_trip.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
command_event.cpp undo: reload dive on removal of gas-switch 2020-04-07 00:13:35 +02:00
command_event.h undo: reload dive on removal of gas-switch 2020-04-07 00:13:35 +02:00
command_pictures.cpp media: give newly created dive sites a name 2020-05-08 08:51:37 -07:00
command_pictures.h undo: make adding of pictures undoable 2020-05-06 13:58:09 -07:00