ConnectFlags::ord()
and connect_ex().flags()
should have a consistent type. · Issue #503 · godot-rust/gdext (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
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? 🙂