Hi.
I've had this diff in my tree for months. Gets rid of an cast and
utilizes C++ memory allocation.
Art Haas
Index: lib/Image.cc
===================================================================
RCS file: /cvsroot/blackboxwm/blackbox/lib/Image.cc,v
retrieving revision 1.54
diff -u -r1.54 Image.cc
--- lib/Image.cc 11 Feb 2005 07:04:52 -0000 1.54
+++ lib/Image.cc 11 Feb 2005 13:44:04 -0000
@@ -578,7 +578,7 @@
bt::Image::~Image(void) {
- free(data);
+ delete [] data;
data = 0;
}
@@ -603,7 +603,7 @@
to = texture.color2();
}
- data = static_cast<RGB *>(malloc(width * height * sizeof(RGB)));
+ data = new RGB[width * height * sizeof(RGB)];
if (texture.texture() & bt::Texture::Diagonal)
dgradient(from, to, interlaced);
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.
-Thomas Jefferson to James Smith, 1822
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
List archives: http://asgardsrealm.net/lurker/splash/index.html