]> git.mxchange.org Git - simgear.git/commitdiff
Melchior FRANZ: Make the clouds3d code valgrind clean
authorehofman <ehofman>
Tue, 5 Aug 2003 18:59:58 +0000 (18:59 +0000)
committerehofman <ehofman>
Tue, 5 Aug 2003 18:59:58 +0000 (18:59 +0000)
simgear/scene/sky/clouds3d/SkyArchive.cpp

index f6a1886d91e6b3d85edd62887e3da6aa9372ae0e..3ff750954db7eae42e79dd4e2803fe16429452cf 100644 (file)
@@ -39,9 +39,9 @@ inline double ulEndianLittleDouble(double x) {
 struct SkyArchiveEntry
 {
   SkyArchiveEntry() : type(0), pData(NULL), iDataSize(0) {}
-  unsigned char type;
-  void*         pData;
-  unsigned int  iDataSize;
+  unsigned char  type;
+  unsigned char* pData;
+  unsigned int   iDataSize;
 };
 
 struct SkyArchiveFileEntry
@@ -192,7 +192,7 @@ SKYRESULT SkyArchive::AddData(const char*         pName,
   }
   else
   {
-    pNewEntry->pData = (void*)pData;
+    pNewEntry->pData = (unsigned char*)pData;
   }
   
   char* pInternalName = new char[::strlen(pName)+1];
@@ -1206,7 +1206,7 @@ SKYRESULT SkyArchive::_Load( FILE* pSrcFile)
       break;
     default:
       {
-        void* pData = new unsigned char[embeddedItem.iDataSize];
+        unsigned char* pData = new unsigned char[embeddedItem.iDataSize];
         iNumItemsRead = fread((void*)pData, embeddedItem.iDataSize, 1, pSrcFile);
         if (1 > iNumItemsRead)
           FAIL_RETURN_MSG(SKYRESULT_FAIL, "Error: SkyArchive::_Load(): failed to read item data.");