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);