[FIX] cppcheck performance fixes