ConnectFlags::ord() and connect_ex().flags() should have a consistent type. · Issue #503 · godot-rust/gdext (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@Lemiczek

Description

@Lemiczek

I've been looking at connect_ex and noticed a curious thing:

let flag = ConnectFlags::CONNECT_ONE_SHOT; node.connect_ex("some_signal".into(), callable) .flags(flag.ord() as u32) // <--- convert to u32? .done();

Why does ConnectFlags::ord return i32 when realistically it should only be u32?
If the Godot team ever decided to use signed integers on an enum (for some reason), we'd have to change the current .flags(value: u32) argument type anyway.

Feels like an unnecessary conversion that could be possibly dealt away with? 🙂