remove deprecated parameter pass by ref #3231

#3231