Remove unneeded function
Merge pull request #5969 from wmtan/RemoveUnneededFunction

Remove unneeded function