Skip to content

Commit

Permalink
Changes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
lilizoey committed Oct 5, 2023
1 parent 83ce546 commit b7b2183
Show file tree
Hide file tree
Showing 9 changed files with 277 additions and 263 deletions.
6 changes: 3 additions & 3 deletions godot-codegen/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,18 +335,18 @@ pub fn make_enum_definition(enum_: &Enum) -> TokenStream {
#index_enum_impl

impl crate::builtin::meta::GodotCompatible for #enum_name {
type Via = i64;
type Via = i32;
}

impl crate::builtin::meta::ToGodot for #enum_name {
fn to_godot(&self) -> Self::Via {
<Self as crate::obj::EngineEnum>::ord(*self) as i64
<Self as crate::obj::EngineEnum>::ord(*self)
}
}

impl crate::builtin::meta::FromGodot for #enum_name {
fn try_from_godot(via: Self::Via) -> Option<Self> {
<Self as crate::obj::EngineEnum>::try_from_ord(i32::try_from(via).ok()?)
<Self as crate::obj::EngineEnum>::try_from_ord(via)
}
}

Expand Down
248 changes: 0 additions & 248 deletions godot-core/src/builtin/meta/godot_compat/impls.rs

This file was deleted.

Loading

0 comments on commit b7b2183

Please sign in to comment.