Cppcheck static code analysis -  performance

experimenting with C++ code analyzer - cppcheck, these are some (minor) things it found