subsurface/desktop-widgets/tab-widgets
Berthold Stoeger 7c9f46acd2 Core: remove MAX_CYLINDERS restriction
Instead of using fixed size arrays, use a new cylinder_table structure.
The code copies the weightsystem code, but is significantly more complex
because cylinders are such an integral part of the core.

Two functions to access the cylinders were added:
get_cylinder() and get_or_create_cylinder()
The former does a simple array access and supposes that the cylinder
exists. The latter is used by the parser(s) and if a cylinder with
the given id does not exist, cylinders up to that id are generated.

One point will make C programmers cringe: the cylinder structure is
passed by value. This is due to the way the table-macros work. A
refactoring of the table macros is planned. It has to be noted that
the size of a cylinder_t is 64 bytes, i.e. 8 long words on a 64-bit
architecture, so passing on the stack is probably not even significantly
slower than passing as reference.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-09 19:19:04 +01:00
..
maintab.cpp Core: remove MAX_CYLINDERS restriction 2019-11-09 19:19:04 +01:00
maintab.h Fix broken windows build with latest MXE 2019-08-29 12:55:25 -07:00
maintab.ui Move the Suit text box from the Notes tab to the Equipment tab 2019-08-08 09:12:09 -07:00
TabBase.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabBase.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveEquipment.cpp Core: remove MAX_CYLINDERS restriction 2019-11-09 19:19:04 +01:00
TabDiveEquipment.h Move the Suit text box from the Notes tab to the Equipment tab 2019-08-08 09:12:09 -07:00
TabDiveEquipment.ui Move the Suit text box from the Notes tab to the Equipment tab 2019-08-08 09:12:09 -07:00
TabDiveExtraInfo.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveExtraInfo.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveExtraInfo.ui Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12:00
TabDiveInformation.cpp Core: remove MAX_CYLINDERS restriction 2019-11-09 19:19:04 +01:00
TabDiveInformation.h Desktop: make salinity a field known to the undo system 2019-10-26 11:36:23 -07:00
TabDiveInformation.ui Convert the atmospheric pressure in the Information Tab to an editable field 2019-05-15 07:37:14 -07:00
TabDivePhotos.cpp Don't expose 'detach_buffer()' to membuffer users 2019-10-27 12:42:54 -07:00
TabDivePhotos.h Write dive data as video subtitles 2019-04-16 20:38:19 +02:00
TabDivePhotos.ui Implement different zoom levels for dive photos tab 2017-12-18 12:07:10 -08:00
TabDiveSite.cpp Cleanup: return each dive site only once in selectedDiveSites() 2019-09-21 16:07:24 -07:00
TabDiveSite.h Cleanup: remove TabDiveSite::updateFilter() function 2019-09-06 11:48:47 -07:00
TabDiveSite.ui Dive sites: add fulltext filter 2019-04-12 18:19:07 +03:00
TabDiveStatistics.cpp Core: remove MAX_CYLINDERS restriction 2019-11-09 19:19:04 +01:00
TabDiveStatistics.h Undo: update statistics if dive changed 2019-10-26 11:36:23 -07:00
TabDiveStatistics.ui Show average max depth in statistics tab 2018-12-17 12:18:26 +01:00