Add new RSSyl feed: use any URI found in the clipboard.
[claws.git] / src / plugins / litehtml_viewer / container_linux.cpp
index 923ce769f7238e23b0e604f89954459f4ef8b8f3..4a455696fbceddceccbfe3ac74148be38d6069ea 100644 (file)
@@ -128,21 +128,11 @@ void container_linux::draw_background( litehtml::uint_ptr hdc, const litehtml::b
        make_url(bg.image.c_str(), bg.baseurl.c_str(), url);
 
        lock_images_cache();
        make_url(bg.image.c_str(), bg.baseurl.c_str(), url);
 
        lock_images_cache();
-       bool found = false;
-       const image *img_i = NULL;
-
-       for (auto ii = m_images.cbegin(); ii != m_images.cend(); ++ii) {
-               const image *i = &(*ii);
-               if (i->first == url) {
-                       img_i = i;
-                       found = true;
-                       break;
-               }
-       }
 
 
-       if(img_i != NULL && img_i->second)
+       auto i = m_images.find(url);
+       if(i != m_images.end() && i->second.first)
        {
        {
-               GdkPixbuf *bgbmp = img_i->second;
+               GdkPixbuf *bgbmp = i->second.first;
 
                GdkPixbuf *new_img;
                if(bg.image_size.width != gdk_pixbuf_get_width(bgbmp) || bg.image_size.height != gdk_pixbuf_get_height(bgbmp))
 
                GdkPixbuf *new_img;
                if(bg.image_size.width != gdk_pixbuf_get_width(bgbmp) || bg.image_size.height != gdk_pixbuf_get_height(bgbmp))