[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6579] Avoid spurious warnings when loading standard wx ic
From: |
gchicares |
Subject: |
[lmi-commits] [6579] Avoid spurious warnings when loading standard wx icons (VZ) |
Date: |
Wed, 11 May 2016 20:03:37 +0000 (UTC) |
Revision: 6579
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6579
Author: chicares
Date: 2016-05-11 20:03:37 +0000 (Wed, 11 May 2016)
Log Message:
-----------
Avoid spurious warnings when loading standard wx icons (VZ)
Modified Paths:
--------------
lmi/trunk/icon_monger.cpp
Modified: lmi/trunk/icon_monger.cpp
===================================================================
--- lmi/trunk/icon_monger.cpp 2016-05-11 20:02:36 UTC (rev 6578)
+++ lmi/trunk/icon_monger.cpp 2016-05-11 20:03:37 UTC (rev 6579)
@@ -31,8 +31,7 @@
#include "alert.hpp"
#include "contains.hpp"
#include "data_directory.hpp"
-#include "map_lookup.hpp"
-#include "path_utility.hpp" // fs::path inserter
+#include "path_utility.hpp" // fs::path inserter
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
@@ -161,14 +160,15 @@
bool is_builtin = 0 == icon_name.find("wxART_");
if(is_builtin)
{
- try
+ typedef std::map<wxArtID,std::string>::const_iterator mci;
+ mci const i = icon_names_by_wx_id_.find(icon_name);
+ if(i == icon_names_by_wx_id_.end())
{
- icon_name = map_lookup(icon_names_by_wx_id_, icon_name);
+ // This is not an error as not all wxART id's have lmi overrides,
+ // so just let the next art provider deal with it.
+ return wxNullBitmap;
}
- catch(...)
- {
- ; // Do nothing. Not all wxART id's have lmi overrides.
- }
+ icon_name = i->second;
}
wxSize const desired_size = desired_icon_size(client, size);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6579] Avoid spurious warnings when loading standard wx icons (VZ),
gchicares <=