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

@ -9,7 +9,6 @@
#include "core/settings/qPrefDiveComputer.h"
#include "core/subsurface-float.h"
#include "core/subsurface-string.h"
#include "core/uemis.h"
#include "core/downloadfromdcthread.h"
#include "desktop-widgets/divelistview.h"
#include "desktop-widgets/mainwindow.h"