Make sure that function style, reinterpret_cast, and static_cast are used for all type conversions, without of casting to void *. Some other related minor changes: add temporal variables, lost space, asserts for case to avoid type conversions by using `->id` way. Pull Request: https://projects.blender.org/blender/blender/pulls/107097