Made appendIndices indices argument const so that one can pass .data() from a const-qualified vector.