re #8418 cppcheck style
re #8418 resolve a couple of errors
Merge branch 'feature/8418_cppcheck_performance' into develop