Skip to content

Fix some warnings #723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2025
Merged

Conversation

cosmicburp
Copy link
Contributor

I was looking through some of the warnings and some of them are easily fixable

I was looking through some of the warnings and some of them are easily fixable
@@ -61,7 +61,7 @@ public struct SignalWithArguments<each T: _GodotBridgeable> {
@discardableResult
public func connect(flags: Object.ConnectFlags = [], _ callback: @escaping (_ t: repeat each T) -> Void) -> Callable {
let callable = Callable(callback)
let error = target?.connect(signal: signalName, callable: callable, flags: UInt32(flags.rawValue))
_ = target?.connect(signal: signalName, callable: callable, flags: UInt32(flags.rawValue))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to actually make this a throwing function but that would break everyone. Not sure what kind of errors we could expect from this anyhow.

@@ -186,7 +186,7 @@ public struct TypedArray<Element: _GodotContainerTypingParameter>: CustomDebugSt
hasher.combine(hash())
}

public static func ==(lhs: Self, rhs: Self) {
public static func == (lhs: Self, rhs: Self) -> Bool {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a genuine error. As in the equatable wasn't implemented at all. Notably also now that I look at it the hash() implementation isn't mirroring the equatable implementation which might cause issues too. They should both use hash or both use array. This might not be a problem not I'd have to see how hash is generated

@migueldeicaza
Copy link
Owner

Thank you for your contribution!

I am a bit unsure about one of the changes on the private, but we will test it live :-)

@migueldeicaza migueldeicaza merged commit 85a3b51 into migueldeicaza:main Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants