[DF-4450] Replace explicit cast with static_cast