Fix const correctness & cleanup superfluous semi-colons

Good eye, thanks. I kept that one intact. I misread it "if not empty" and thought it wasn't in/out variable.