heap: remove automatic casts