core: convert uemis.c to C++

The uemis code is wild. It simply doesn't deallocate memory
and uses global variables. To get this under control, create
a "struct uemis" and make the functions exported by "uemis.h"
members of "struct uemis". Thus, we don't have to carry around
a parameter for the state of the importing process.

Turn a linked list of "helper" structures (one per imported dive)
into a std::unordered_map, to fix leaking of the helper structures.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-04-23 22:09:52 +08:00 committed by bstoeger
parent cdc87618da
commit b28d6cf0fc
6 changed files with 122 additions and 147 deletions

View file

@ -187,7 +187,7 @@ set(SUBSURFACE_CORE_LIB_SRCS
trip.c
trip.h
uemis-downloader.cpp
uemis.c
uemis.cpp
uemis.h
units.h
units.c