Patch: Hashtable fixes for Win32


Subject: Patch: Hashtable fixes for Win32
From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Wed Jun 13 2001 - 04:45:12 CDT


Here's a few changes that were missed. They should be right.

Andrew Dunbar.

-- 
http://linguaphile.sourceforge.net

Index: src/af/util/win/ut_Xpm2Bmp.cpp =================================================================== RCS file: /cvsroot/abi/src/af/util/win/ut_Xpm2Bmp.cpp,v retrieving revision 1.7 diff -u -r1.7 ut_Xpm2Bmp.cpp --- src/af/util/win/ut_Xpm2Bmp.cpp 2001/05/26 02:22:05 1.7 +++ src/af/util/win/ut_Xpm2Bmp.cpp 2001/06/13 09:35:26 @@ -93,7 +93,7 @@ pbmih->biClrUsed = nrColors; // should we verify that they are all actually used ?? pbmih->biClrImportant = 0; - UT_HashTable hash(61); + UT_StringPtrMap hash(61); UT_RGBColor color(0,0,0); // walk thru the palette @@ -121,7 +121,7 @@ // make the ".." a hash key and store our color index as the data. // we add k+1 because the hash code does not like null pointers... - hash.insert(bufSymbol, (UT_HashTable::HashValType)(k+1)); + hash.insert(bufSymbol, (void *)(k+1)); // store the actual color value in the rgb quad array with our color index. @@ -160,7 +160,7 @@ for (UT_uint32 kPx=0; (kPx < charsPerPixel); kPx++) bufPixel[kPx] = *p++; - const UT_HashTable::HashValType pEntry = hash.pick(bufPixel); + const void * pEntry = hash.pick(bufPixel); *pPixel++ = ((UT_Byte)(pEntry)) - 1; }

_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com



This archive was generated by hypermail 2b25 : Wed Jun 13 2001 - 05:44:20 CDT