core: convert save-profiledata to C++

Leave the code as is for now. Just replace membuffer by its
C++ version.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-03 07:48:17 +02:00 committed by bstoeger
parent e537904965
commit aaab5157d4
3 changed files with 3 additions and 4 deletions

View file

@ -105,7 +105,7 @@ SOURCES += subsurface-mobile-main.cpp \
core/qt-ble.cpp \
core/uploadDiveShare.cpp \
core/uploadDiveLogsDE.cpp \
core/save-profiledata.c \
core/save-profiledata.cpp \
core/xmlparams.cpp \
core/settings/qPref.cpp \
core/settings/qPrefCloudStorage.cpp \

View file

@ -158,7 +158,7 @@ set(SUBSURFACE_CORE_LIB_SRCS
save-git.cpp
save-html.cpp
save-html.h
save-profiledata.c
save-profiledata.cpp
save-xml.cpp
selection.cpp
selection.h

View file

@ -246,7 +246,7 @@ void save_subtitles_buffer(struct membuffer *b, struct dive *dive, int offset, i
int save_profiledata(const char *filename, bool select_only)
{
struct membuffer buf = { 0 };
struct membufferpp buf;
FILE *f;
int error = 0;
@ -265,6 +265,5 @@ int save_profiledata(const char *filename, bool select_only)
if (error)
report_error("Save failed (%s)", strerror(errno));
free_buffer(&buf);
return error;
}