COMP:Fixed old-style cast warnin either by using new style or just removing the cast when it redundant.