From cd9bf7542c5c4ec093da938759bc504b8da8f7b7 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 3 May 2024 21:38:11 +0200 Subject: [PATCH] core: convert event.c to C++ No code changes. Signed-off-by: Berthold Stoeger --- Subsurface-mobile.pro | 2 +- core/CMakeLists.txt | 2 +- core/{event.c => event.cpp} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename core/{event.c => event.cpp} (98%) diff --git a/Subsurface-mobile.pro b/Subsurface-mobile.pro index 3e4727b41..0eec317d3 100644 --- a/Subsurface-mobile.pro +++ b/Subsurface-mobile.pro @@ -51,7 +51,7 @@ SOURCES += subsurface-mobile-main.cpp \ core/dive.cpp \ core/divecomputer.cpp \ core/divefilter.cpp \ - core/event.c \ + core/event.cpp \ core/eventtype.cpp \ core/filterconstraint.cpp \ core/filterpreset.cpp \ diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 24b6f90bf..aea078480 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -79,7 +79,7 @@ set(SUBSURFACE_CORE_LIB_SRCS divesitehelpers.h downloadfromdcthread.cpp downloadfromdcthread.h - event.c + event.cpp event.h eventtype.cpp eventtype.h diff --git a/core/event.c b/core/event.cpp similarity index 98% rename from core/event.c rename to core/event.cpp index dd5551761..6c7c7811e 100644 --- a/core/event.c +++ b/core/event.cpp @@ -49,7 +49,7 @@ struct event *create_event(unsigned int time, int type, int flags, int value, co unsigned int size, len = strlen(name); size = sizeof(*ev) + len + 1; - ev = malloc(size); + ev = (struct event*) malloc(size); if (!ev) return NULL; memset(ev, 0, size);