cppcheck: don't use C-style casts