Rewrote class object casts as static_cast<>.