cppcheck performance fixes in cores/playercorefactory