BImageControl::BImageControl(BaseDisplay *dpy, const ScreenInfo *scrn,
bool _dither, int _cpc,
unsigned long cache_timeout,
- unsigned long cmax)
-{
+ unsigned long cmax) {
if (! ctrl) ctrl = this;
basedisplay = dpy;
if (colors) {
unsigned long *pixels = new unsigned long [ncolors];
- int i;
- for (i = 0; i < ncolors; i++)
+ for (int i = 0; i < ncolors; i++)
*(pixels + i) = (*(colors + i)).pixel;
XFreeColors(basedisplay->getXDisplay(), colormap, pixels, ncolors, 0);
//#endif
CacheContainer::iterator it = cache.begin();
const CacheContainer::iterator end = cache.end();
- for (; it != end; ++it) {
- XFreePixmap(basedisplay->getXDisplay(), (*it).pixmap);
- }
+ for (; it != end; ++it)
+ XFreePixmap(basedisplay->getXDisplay(), it->pixmap);
}
#ifdef TIMEDCACHE
if (timer) {
const CacheContainer::iterator end = cache.end();
for (; it != end; ++it) {
CachedImage& tmp = *it;
- if ((tmp.width == width) && (tmp.height == height) &&
- (tmp.texture == texture) && (tmp.pixel1 == c1.pixel()))
+ if (tmp.width == width && tmp.height == height &&
+ tmp.texture == texture && tmp.pixel1 == c1.pixel())
if (texture & BTexture::Gradient) {
if (tmp.pixel2 == c2.pixel()) {
tmp.count++;
unsigned int **ybuf)
{
if (w > grad_buffer_width) {
- if (grad_xbuffer) {
+ if (grad_xbuffer)
delete [] grad_xbuffer;
- }
grad_buffer_width = w;
}
if (h > grad_buffer_height) {
- if (grad_ybuffer) {
+ if (grad_ybuffer)
delete [] grad_ybuffer;
- }
grad_buffer_height = h;