[Overall] Avoid ugly static_cast<TaskParameters>'s.