Skip to content

Commit 0bc01c2

Browse files
moulinskmeisthax
authored andcommitted
core: remove impl_display_object_container! macro
It is replaced by two accessor methods on the trait + default implementations of all other methods.
1 parent f31f52f commit 0bc01c2

File tree

6 files changed

+247
-271
lines changed

6 files changed

+247
-271
lines changed

core/src/display_object/avm1_button.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,16 @@ impl<'gc> TDisplayObject<'gc> for Avm1Button<'gc> {
401401
}
402402

403403
impl<'gc> TDisplayObjectContainer<'gc> for Avm1Button<'gc> {
404-
impl_display_object_container!(container);
404+
fn raw_container(&self) -> Ref<'_, ChildContainer<'gc>> {
405+
Ref::map(self.0.read(), |this| &this.container)
406+
}
407+
408+
fn raw_container_mut(
409+
&self,
410+
gc_context: MutationContext<'gc, '_>,
411+
) -> RefMut<'_, ChildContainer<'gc>> {
412+
RefMut::map(self.0.write(gc_context), |this| &mut this.container)
413+
}
405414
}
406415

407416
impl<'gc> TInteractiveObject<'gc> for Avm1Button<'gc> {

0 commit comments

Comments
 (0)