don't pass const pointers as array boundaries in sort