This doesn't actually modify the internal class state, so it can be a const member function. While we're at it, amend the function to take its arguments by const reference.