cppcheck performance fixes in dialogs/