Skip to content

Commit

Permalink
various fixes - memory leaks & object cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamakaio committed Oct 3, 2024
1 parent 3e4a34a commit f1eaa18
Show file tree
Hide file tree
Showing 10 changed files with 529 additions and 565 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ SET(CUSTOM_CONFIGURATION ON CACHE BOOL "" FORCE)
SET(ENABLE_ALL_WARNINGS OFF CACHE BOOL "" FORCE)
SET(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
ADD_SUBDIRECTORY(JoltPhysics/Build EXCLUDE_FROM_ALL)
target_compile_options(Jolt PRIVATE "-fPIC")
set_property(TARGET Jolt PROPERTY POSITION_INDEPENDENT_CODE ON)

SET( GODOT_CPP_SYSTEM_HEADERS ON CACHE BOOL "" FORCE )

Expand Down
21 changes: 0 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,6 @@ endif()
# Set project name
PROJECT(OSP-MAGNUM CXX)

# From: https://crascit.com/2016/04/09/using-ccache-with-cmake/
find_program( CCACHE_PROGRAM ccache )

if ( CCACHE_PROGRAM )
# get version information
execute_process(
COMMAND "${CCACHE_PROGRAM}" --version
OUTPUT_VARIABLE CCACHE_VERSION
)

string( REGEX MATCH "[^\r\n]*" CCACHE_VERSION ${CCACHE_VERSION} )

message( STATUS "Using ccache: ${CCACHE_PROGRAM} (${CCACHE_VERSION})" )

# Turn on ccache for all targets
set( CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" )
set( CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" )

unset( CCACHE_VERSION )
endif()

# Setup things for the test subdir below
# Has to be in toplevel CMakeLists.txt or ctest gets mad.
enable_testing()
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if(NOT Threads_FOUND)
endif()

#compile as position-independant to avoid link errors on static link
add_compile_options("-fPIC")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

add_subdirectory(adera)
add_subdirectory(adera_app)
Expand Down
1 change: 1 addition & 0 deletions src/adera_app/features/vehicles_machines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ FeatureDef const ftrMagicRocketThrustIndicator = feature_def("MagicRocketThrustI
if (thrustMag == 0.0f)
{
rScnRender.m_visible.erase(drawEnt);
rMat.m_dirty.push_back(drawEnt);
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/gdextension/feature_interfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct FIGodot {

struct FIGodotScene {
struct DataIds {
DataId scnRenderGl;
DataId scnRenderGd;
DataId camera;
};

Expand Down
Loading

0 comments on commit f1eaa18

Please sign in to comment.