From 0bd1fe7aac5fdc3a30ea0de39c2e77858f969e5d Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 12 Apr 2022 20:43:42 +0200 Subject: [PATCH] [godot] Fix compilation errors on Clang. --- spine-godot/spine_godot/SpineAnimation.h | 2 +- spine-godot/spine_godot/SpineAtlasResource.cpp | 6 +++--- spine-godot/spine_godot/SpineAtlasResource.h | 5 +---- spine-godot/spine_godot/SpineEvent.h | 2 ++ spine-godot/spine_godot/SpineIkConstraint.h | 1 + 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spine-godot/spine_godot/SpineAnimation.h b/spine-godot/spine_godot/SpineAnimation.h index a6051b2ea..80c101ee3 100644 --- a/spine-godot/spine_godot/SpineAnimation.h +++ b/spine-godot/spine_godot/SpineAnimation.h @@ -32,7 +32,7 @@ #include "SpineConstant.h" #include "core/reference.h" -#include +#include class SpineEvent; class SpineSkeleton; diff --git a/spine-godot/spine_godot/SpineAtlasResource.cpp b/spine-godot/spine_godot/SpineAtlasResource.cpp index 37193461b..36c7f2537 100644 --- a/spine-godot/spine_godot/SpineAtlasResource.cpp +++ b/spine-godot/spine_godot/SpineAtlasResource.cpp @@ -70,8 +70,8 @@ public: if (error != OK) { ERR_PRINT(vformat("Can't load texture: \"%s\"", String(path.buffer()))); auto renderer_object = memnew(SpineRendererObject); - renderer_object->texture = nullptr; - renderer_object->normal_map = nullptr; + renderer_object->texture = Ref(nullptr); + renderer_object->normal_map = Ref(nullptr); page.setRendererObject((void *) renderer_object); return; } @@ -79,7 +79,7 @@ public: textures->append(texture); auto renderer_object = memnew(SpineRendererObject); renderer_object->texture = texture; - renderer_object->normal_map = nullptr; + renderer_object->normal_map = Ref(nullptr); String temp_path = fixed_path; String new_path = vformat("%s/%s_%s", temp_path.get_base_dir(), normal_map_prefix, temp_path.get_file()); diff --git a/spine-godot/spine_godot/SpineAtlasResource.h b/spine-godot/spine_godot/SpineAtlasResource.h index bff5c1e4f..abe0dd67f 100644 --- a/spine-godot/spine_godot/SpineAtlasResource.h +++ b/spine-godot/spine_godot/SpineAtlasResource.h @@ -30,14 +30,11 @@ #ifndef GODOT_SPINEATLASRESOURCE_H #define GODOT_SPINEATLASRESOURCE_H - -#include - #include "core/io/resource_loader.h" #include "core/io/resource_saver.h" #include "core/io/image_loader.h" +#include -class spine::Atlas; class GodotSpineTextureLoader; class SpineAtlasResource : public Resource { diff --git a/spine-godot/spine_godot/SpineEvent.h b/spine-godot/spine_godot/SpineEvent.h index 1223993e1..e976b20de 100644 --- a/spine-godot/spine_godot/SpineEvent.h +++ b/spine-godot/spine_godot/SpineEvent.h @@ -31,6 +31,8 @@ #define GODOT_SPINEEVENT_H #include "SpineEventData.h" +#include "core/reference.h" +#include class SpineEvent : public Reference { GDCLASS(SpineEvent, Reference) diff --git a/spine-godot/spine_godot/SpineIkConstraint.h b/spine-godot/spine_godot/SpineIkConstraint.h index 22b42a7ff..fe2d945e0 100644 --- a/spine-godot/spine_godot/SpineIkConstraint.h +++ b/spine-godot/spine_godot/SpineIkConstraint.h @@ -31,6 +31,7 @@ #define GODOT_SPINEIKCONSTRAINT_H #include "SpineIkConstraintData.h" +#include class SpineBone;