Replaced non-const reference arguments with value arguments for ptrs.

These functions were only making copies of these arguments. There wasn't
any modification. This commit made these arguments value-types instead
to be more flexible to calling code.