mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-05 00:21:29 +00:00
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:
parent
834f2278fc
commit
24a6af9ac1
3 changed files with 3 additions and 4 deletions
|
@ -105,7 +105,7 @@ SOURCES += subsurface-mobile-main.cpp \
|
||||||
core/qt-ble.cpp \
|
core/qt-ble.cpp \
|
||||||
core/uploadDiveShare.cpp \
|
core/uploadDiveShare.cpp \
|
||||||
core/uploadDiveLogsDE.cpp \
|
core/uploadDiveLogsDE.cpp \
|
||||||
core/save-profiledata.c \
|
core/save-profiledata.cpp \
|
||||||
core/xmlparams.cpp \
|
core/xmlparams.cpp \
|
||||||
core/settings/qPref.cpp \
|
core/settings/qPref.cpp \
|
||||||
core/settings/qPrefCloudStorage.cpp \
|
core/settings/qPrefCloudStorage.cpp \
|
||||||
|
|
|
@ -158,7 +158,7 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
||||||
save-git.cpp
|
save-git.cpp
|
||||||
save-html.cpp
|
save-html.cpp
|
||||||
save-html.h
|
save-html.h
|
||||||
save-profiledata.c
|
save-profiledata.cpp
|
||||||
save-xml.cpp
|
save-xml.cpp
|
||||||
selection.cpp
|
selection.cpp
|
||||||
selection.h
|
selection.h
|
||||||
|
|
|
@ -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)
|
int save_profiledata(const char *filename, bool select_only)
|
||||||
{
|
{
|
||||||
struct membuffer buf = { 0 };
|
struct membufferpp buf;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
|
@ -265,6 +265,5 @@ int save_profiledata(const char *filename, bool select_only)
|
||||||
if (error)
|
if (error)
|
||||||
report_error("Save failed (%s)", strerror(errno));
|
report_error("Save failed (%s)", strerror(errno));
|
||||||
|
|
||||||
free_buffer(&buf);
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
Loading…
Reference in a new issue