From b9b51ffd4ebd14e085bef69ee0daf6a1927cc960 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 17 Oct 2020 16:29:32 +0200 Subject: core: add a small helper-struct that keeps track of xml-parameters The XML-parameter code is a mess. Ownership is unclear. Allocation and freeing of strings is in different functions. Sometimes only every second string is free()d, because keys are not copied. But this is done inconsistently. The caller has to know how many parameters the callee may add. Instead, let's add a small helper-struct that uses C++ memory management, but exports a C-API. The array for the XML-library is generated on the fly. This is only the implementation, the old code is not yet replaced. Signed-off-by: Berthold Stoeger --- packaging/ios/Subsurface-mobile.pro | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packaging') diff --git a/packaging/ios/Subsurface-mobile.pro b/packaging/ios/Subsurface-mobile.pro index c83ebb57e..7a6498ebd 100644 --- a/packaging/ios/Subsurface-mobile.pro +++ b/packaging/ios/Subsurface-mobile.pro @@ -104,6 +104,7 @@ SOURCES += ../../subsurface-mobile-main.cpp \ ../../core/uploadDiveShare.cpp \ ../../core/uploadDiveLogsDE.cpp \ ../../core/save-profiledata.c \ + ../../core/xmlparams.cpp \ ../../core/settings/qPref.cpp \ ../../core/settings/qPrefCloudStorage.cpp \ ../../core/settings/qPrefDisplay.cpp \ @@ -255,6 +256,7 @@ HEADERS += \ ../../core/save-profiledata.h \ ../../core/uploadDiveShare.h \ ../../core/uploadDiveLogsDE.h \ + ../../core/xmlparams.h \ ../../core/settings/qPref.h \ ../../core/settings/qPrefCloudStorage.h \ ../../core/settings/qPrefDisplay.h \ -- cgit v1.2.3-70-g09d2