From 1da6f46cb235a5c2135f4a205fec9aa80ea6192a Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 18 Oct 2011 00:09:51 +0000 Subject: [PATCH] Log a warning in icon::get if the icon doesn't exist rather than using printf Originally committed to SVN as r5755. --- aegisub/src/command/icon.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/aegisub/src/command/icon.cpp b/aegisub/src/command/icon.cpp index 312988a04..dbfc86564 100644 --- a/aegisub/src/command/icon.cpp +++ b/aegisub/src/command/icon.cpp @@ -43,20 +43,17 @@ wxBitmap const& get(std::string const& name, const int size) { // concerned about it. if (size != 24) { iconMap::iterator index; - - if ((index = icon16.find(name)) != icon16.end()) { + if ((index = icon16.find(name)) != icon16.end()) return index->second; - } - printf("icon::get NOT FOUND (%s)\n", name.c_str()); } else { iconMap::iterator index; - - if ((index = icon24.find(name)) != icon24.end()) { + if ((index = icon24.find(name)) != icon24.end()) return index->second; - } - printf("icon::get NOT FOUND (%s)\n", name.c_str()); } + + LOG_W("icon/get") << "Icon not found: " << name << " " << size; + static wxBitmap empty; return empty; }