diff --git a/Subsurface-mobile.pro b/Subsurface-mobile.pro index a421c7d6f..23f411ad6 100644 --- a/Subsurface-mobile.pro +++ b/Subsurface-mobile.pro @@ -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 \ diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index e8867217f..f9d945557 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -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 diff --git a/core/save-profiledata.c b/core/save-profiledata.cpp similarity index 99% rename from core/save-profiledata.c rename to core/save-profiledata.cpp index fa83e5bb1..a560eb19d 100644 --- a/core/save-profiledata.c +++ b/core/save-profiledata.cpp @@ -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; }