cppcheck performance fixes in dbwrappers/