From 3394ce793141b16271d1eb85c91ce4b4b72fa4be Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 4 May 2024 15:55:40 +0200 Subject: [PATCH] core: convert trip.c to C++ Necessary so that we can continue porting the divesite code to C++. Signed-off-by: Berthold Stoeger --- Subsurface-mobile.pro | 2 +- core/CMakeLists.txt | 2 +- core/{trip.c => trip.cpp} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename core/{trip.c => trip.cpp} (99%) diff --git a/Subsurface-mobile.pro b/Subsurface-mobile.pro index 1eae8080b..8e1587a1b 100644 --- a/Subsurface-mobile.pro +++ b/Subsurface-mobile.pro @@ -97,7 +97,7 @@ SOURCES += subsurface-mobile-main.cpp \ core/tag.cpp \ core/taxonomy.cpp \ core/time.cpp \ - core/trip.c \ + core/trip.cpp \ core/units.cpp \ core/uemis.cpp \ core/btdiscovery.cpp \ diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index e132eb68a..f95851f7d 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -181,7 +181,7 @@ set(SUBSURFACE_CORE_LIB_SRCS taxonomy.cpp taxonomy.h time.cpp - trip.c + trip.cpp trip.h uemis-downloader.cpp uemis.cpp diff --git a/core/trip.c b/core/trip.cpp similarity index 99% rename from core/trip.c rename to core/trip.cpp index 53c6a4b15..bb7e57929 100644 --- a/core/trip.c +++ b/core/trip.cpp @@ -128,7 +128,7 @@ void remove_dive_from_trip(struct dive *dive, struct trip_table *trip_table_arg) dive_trip_t *alloc_trip(void) { - dive_trip_t *res = calloc(1, sizeof(dive_trip_t)); + dive_trip_t *res = (dive_trip_t *)calloc(1, sizeof(dive_trip_t)); res->id = dive_getUniqID(); return res; }