replace c-style casts with c++ style for recorder library