If you're going to be making a local copy inside the function anyway, use pass by value. It's simpler, and simpler is usually good.
P.S. when you're returning a bool
result you don't usually need an if
statement for it.
return !source.isEmpty();