Remove an ambiguous overload.

The overload between a pointer and unsigned is ambiguous. It also now
adheres to our coding standard: use a reference when a pointer may not
be NULL.
Remove no longer needed old-style-casts.