aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/ImageControl.cc
diff options
context:
space:
mode:
authormathias <mathias>2006-10-30 19:31:15 (GMT)
committermathias <mathias>2006-10-30 19:31:15 (GMT)
commite5e76e7761f52ba7c0deca75bcecae4fbd3e2ff5 (patch)
treec84838a84802805e9b1463045e86200b7cef917f /src/FbTk/ImageControl.cc
parent426c12c25c2ef095a882619ad7424684b88465b8 (diff)
downloadfluxbox-e5e76e7761f52ba7c0deca75bcecae4fbd3e2ff5.zip
fluxbox-e5e76e7761f52ba7c0deca75bcecae4fbd3e2ff5.tar.bz2
Cosmetic patch from Slava Semushin
Diffstat (limited to 'src/FbTk/ImageControl.cc')
-rw-r--r--src/FbTk/ImageControl.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc
index f209958..c1fa7a5 100644
--- a/src/FbTk/ImageControl.cc
+++ b/src/FbTk/ImageControl.cc
@@ -67,7 +67,9 @@
67 67
68#include <iostream> 68#include <iostream>
69 69
70using namespace std; 70using std::cerr;
71using std::endl;
72using std::list;
71 73
72namespace FbTk { 74namespace FbTk {
73 75
@@ -175,7 +177,7 @@ Pixmap ImageControl::searchCache(unsigned int width, unsigned int height,
175 for (; it != it_end; ++it) { 177 for (; it != it_end; ++it) {
176 if ((*it)->texture_pixmap == text.pixmap().drawable() && 178 if ((*it)->texture_pixmap == text.pixmap().drawable() &&
177 (*it)->orient == orient && 179 (*it)->orient == orient &&
178 (*it)->width == width && 180 (*it)->width == width &&
179 (*it)->height == height && 181 (*it)->height == height &&
180 (*it)->texture == text.type()) { 182 (*it)->texture == text.type()) {
181 (*it)->count++; 183 (*it)->count++;
@@ -233,7 +235,7 @@ Pixmap ImageControl::renderImage(unsigned int width, unsigned int height,
233 } 235 }
234 236
235 // render new image 237 // render new image
236 238
237 TextureRender image(*this, width, height, orient, m_colors, m_num_colors); 239 TextureRender image(*this, width, height, orient, m_colors, m_num_colors);
238 pixmap = image.render(texture); 240 pixmap = image.render(texture);
239 241
@@ -398,7 +400,7 @@ unsigned long ImageControl::getSqrt(unsigned int x) const {
398 400
399void ImageControl::cleanCache() { 401void ImageControl::cleanCache() {
400 Display *disp = FbTk::App::instance()->display(); 402 Display *disp = FbTk::App::instance()->display();
401 std::list<CacheList::iterator> deadlist; 403 list<CacheList::iterator> deadlist;
402 CacheList::iterator it = cache.begin(); 404 CacheList::iterator it = cache.begin();
403 CacheList::iterator it_end = cache.end(); 405 CacheList::iterator it_end = cache.end();
404 for (; it != it_end; ++it) { 406 for (; it != it_end; ++it) {
@@ -411,8 +413,8 @@ void ImageControl::cleanCache() {
411 } 413 }
412 } 414 }
413 415
414 std::list<CacheList::iterator>::iterator dead_it = deadlist.begin(); 416 list<CacheList::iterator>::iterator dead_it = deadlist.begin();
415 std::list<CacheList::iterator>::iterator dead_it_end = deadlist.end(); 417 list<CacheList::iterator>::iterator dead_it_end = deadlist.end();
416 for (; dead_it != dead_it_end; ++dead_it) { 418 for (; dead_it != dead_it_end; ++dead_it) {
417 cache.erase(*dead_it); 419 cache.erase(*dead_it);
418 } 420 }