Thread with 4 posts
jump to expanded postexciting programming problem in touchHLE: supporting inheritance for instance variables. look at how gnarly this is:
https://github.com/hikari-no-yume/touchHLE/commit/ae5b7a8d6513e3204d3c2eab1f250cdcf8930ee5
i have an idea for a neater solution, but it will involve descending further into the land of Any
s and 'static
s and 'a
s and dyn
s :3
THE BAD NEWS: i have ran head-first into the borrow checker struggling with mutable borrows in loops again ;_;
THE GOOD NEWS: unsafe { &mut *(a as *mut _) }
is my friend and would never hurt me :3
my solution for inheritance works perfectly 😤 and it's beautiful 🥺 https://github.com/hikari-no-yume/touchHLE/commit/c6837f4eaf7ad61655aee09d268780adbe19081f
@hikari *applause* 👏👏👏