Add different casts from pointer and ref to avoid bugs
4 files changed