Convert internal function parameter to const &

Performance improvement

Change-Id: I9565771ab6ed15dccc67d5d7e7d5c02759a40367
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>