Modify pass-by-value to pass-by-reference-to-const