Const correctness + fixing a warning from VS