Pass by const reference instead of value.

There is no need to have an value copy, so an const reference is faster.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>