From da988d8d41713cc01c6d28f7754761a35dba31fe Mon Sep 17 00:00:00 2001 From: Mikhail Tishin Date: Mon, 25 Sep 2023 23:08:16 +0300 Subject: [PATCH] Add explicit cast to AnyObject to fix compilation on Windows --- Sources/SwiftGodot/Core/Wrapped.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftGodot/Core/Wrapped.swift b/Sources/SwiftGodot/Core/Wrapped.swift index e33320f72..023acdece 100644 --- a/Sources/SwiftGodot/Core/Wrapped.swift +++ b/Sources/SwiftGodot/Core/Wrapped.swift @@ -167,7 +167,7 @@ func register (type name: StringName, parent: StringName, type: T.Typ info.get_virtual_func = getVirtual info.notification_func = notificationFunc - let retained = Unmanaged.passRetained(type) + let retained = Unmanaged.passRetained(type as AnyObject) info.class_userdata = retained.toOpaque() gi.classdb_register_extension_class (library, UnsafeRawPointer (&name.content), UnsafeRawPointer(&parent.content), &info) @@ -194,7 +194,7 @@ public func register (type: T.Type) { return String (describing: t) } - guard let superStr = getSuperType (type: type) else { + guard let superStr = getSuperType (type: type as AnyObject) else { print ("You can not register the root class") return }