Use const reference instead of vector copying.