/[svn]/libgig/trunk/src/RIFF.cpp
ViewVC logotype

Diff of /libgig/trunk/src/RIFF.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1102 by persson, Sun Mar 18 07:13:06 2007 UTC revision 1863 by schoenebeck, Fri Mar 13 10:57:24 2009 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   libgig - C++ cross-platform Gigasampler format file access library    *   *   libgig - C++ cross-platform Gigasampler format file access library    *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003-2007 by Christian Schoenebeck                      *   *   Copyright (C) 2003-2009 by Christian Schoenebeck                      *
6   *                              <cuse@users.sourceforge.net>               *   *                              <cuse@users.sourceforge.net>               *
7   *                                                                         *   *                                                                         *
8   *   This library is free software; you can redistribute it and/or modify  *   *   This library is free software; you can redistribute it and/or modify  *
# Line 21  Line 21 
21   *   MA  02111-1307  USA                                                   *   *   MA  02111-1307  USA                                                   *
22   ***************************************************************************/   ***************************************************************************/
23    
24    #include <algorithm>
25  #include <string.h>  #include <string.h>
26    
27  #include "RIFF.h"  #include "RIFF.h"
# Line 29  Line 30 
30    
31  namespace RIFF {  namespace RIFF {
32    
33    // *************** Internal functions **************
34    // *
35    
36        /// Returns a human readable path of the given chunk.
37        static String __resolveChunkPath(Chunk* pCk) {
38            String sPath;
39            for (Chunk* pChunk = pCk; pChunk; pChunk = pChunk->GetParent()) {
40                if (pChunk->GetChunkID() == CHUNK_ID_LIST) {
41                    List* pList = (List*) pChunk;
42                    sPath = "->'" + pList->GetListTypeString() + "'" + sPath;
43                } else {
44                    sPath = "->'" + pChunk->GetChunkIDString() + "'" + sPath;
45                }
46            }
47            return sPath;
48        }
49    
50    
51    
52  // *************** Chunk **************  // *************** Chunk **************
53  // *  // *
54    
# Line 39  namespace RIFF { Line 59  namespace RIFF {
59          ulPos      = 0;          ulPos      = 0;
60          pParent    = NULL;          pParent    = NULL;
61          pChunkData = NULL;          pChunkData = NULL;
62            CurrentChunkSize = 0;
63            NewChunkSize = 0;
64          ulChunkDataSize = 0;          ulChunkDataSize = 0;
65          ChunkID    = CHUNK_ID_RIFF;          ChunkID    = CHUNK_ID_RIFF;
66          this->pFile = pFile;          this->pFile = pFile;
# Line 53  namespace RIFF { Line 75  namespace RIFF {
75          pParent       = Parent;          pParent       = Parent;
76          ulPos         = 0;          ulPos         = 0;
77          pChunkData    = NULL;          pChunkData    = NULL;
78            CurrentChunkSize = 0;
79            NewChunkSize = 0;
80          ulChunkDataSize = 0;          ulChunkDataSize = 0;
81          ReadHeader(StartPos);          ReadHeader(StartPos);
82      }      }
# Line 63  namespace RIFF { Line 87  namespace RIFF {
87          this->pParent    = pParent;          this->pParent    = pParent;
88          ulPos            = 0;          ulPos            = 0;
89          pChunkData       = NULL;          pChunkData       = NULL;
         ulChunkDataSize  = 0;  
90          ChunkID          = uiChunkID;          ChunkID          = uiChunkID;
91            ulChunkDataSize  = 0;
92          CurrentChunkSize = 0;          CurrentChunkSize = 0;
93          NewChunkSize     = uiBodySize;          NewChunkSize     = uiBodySize;
94      }      }
95    
96      Chunk::~Chunk() {      Chunk::~Chunk() {
97          if (CurrentChunkSize != NewChunkSize) pFile->UnlogResized(this);          pFile->UnlogResized(this);
98          if (pChunkData) delete[] pChunkData;          if (pChunkData) delete[] pChunkData;
99      }      }
100    
# Line 78  namespace RIFF { Line 102  namespace RIFF {
102          #if DEBUG          #if DEBUG
103          std::cout << "Chunk::Readheader(" << fPos << ") ";          std::cout << "Chunk::Readheader(" << fPos << ") ";
104          #endif // DEBUG          #endif // DEBUG
105            ChunkID = 0;
106            NewChunkSize = CurrentChunkSize = 0;
107          #if POSIX          #if POSIX
108          if (lseek(pFile->hFileRead, fPos, SEEK_SET) != -1) {          if (lseek(pFile->hFileRead, fPos, SEEK_SET) != -1) {
109              read(pFile->hFileRead, &ChunkID, 4);              read(pFile->hFileRead, &ChunkID, 4);
# Line 108  namespace RIFF { Line 134  namespace RIFF {
134              }              }
135              #if DEBUG              #if DEBUG
136              std::cout << "ckID=" << convertToString(ChunkID) << " ";              std::cout << "ckID=" << convertToString(ChunkID) << " ";
137              std::cout << "ckSize=" << ChunkSize << " ";              std::cout << "ckSize=" << CurrentChunkSize << " ";
138              std::cout << "bEndianNative=" << bEndianNative << std::endl;              std::cout << "bEndianNative=" << pFile->bEndianNative << std::endl;
139              #endif // DEBUG              #endif // DEBUG
140              NewChunkSize = CurrentChunkSize;              NewChunkSize = CurrentChunkSize;
141          }          }
# Line 205  namespace RIFF { Line 231  namespace RIFF {
231         #if DEBUG         #if DEBUG
232         std::cout << "Chunk::Remainingbytes()=" << CurrentChunkSize - ulPos << std::endl;         std::cout << "Chunk::Remainingbytes()=" << CurrentChunkSize - ulPos << std::endl;
233         #endif // DEBUG         #endif // DEBUG
234          return CurrentChunkSize - ulPos;          return (CurrentChunkSize > ulPos) ? CurrentChunkSize - ulPos : 0;
235      }      }
236    
237      /**      /**
# Line 216  namespace RIFF { Line 242  namespace RIFF {
242       *  - RIFF::stream_closed :       *  - RIFF::stream_closed :
243       *    the data stream was closed somehow, no more reading possible       *    the data stream was closed somehow, no more reading possible
244       *  - RIFF::stream_end_reached :       *  - RIFF::stream_end_reached :
245       *    alreaady reached the end of the chunk data, no more reading       *    already reached the end of the chunk data, no more reading
246       *    possible without SetPos()       *    possible without SetPos()
247       */       */
248      stream_state_t Chunk::GetState() {      stream_state_t Chunk::GetState() {
# Line 254  namespace RIFF { Line 280  namespace RIFF {
280         #if DEBUG         #if DEBUG
281         std::cout << "Chunk::Read(void*,ulong,ulong)" << std::endl;         std::cout << "Chunk::Read(void*,ulong,ulong)" << std::endl;
282         #endif // DEBUG         #endif // DEBUG
283            if (ulStartPos == 0) return 0; // is only 0 if this is a new chunk, so nothing to read (yet)
284          if (ulPos >= CurrentChunkSize) return 0;          if (ulPos >= CurrentChunkSize) return 0;
285          if (ulPos + WordCount * WordSize >= CurrentChunkSize) WordCount = (CurrentChunkSize - ulPos) / WordSize;          if (ulPos + WordCount * WordSize >= CurrentChunkSize) WordCount = (CurrentChunkSize - ulPos) / WordSize;
286          #if POSIX          #if POSIX
# Line 339  namespace RIFF { Line 366  namespace RIFF {
366          #elif defined(WIN32)          #elif defined(WIN32)
367          if (SetFilePointer(pFile->hFileWrite, ulStartPos + ulPos, NULL/*32 bit*/, FILE_BEGIN) == INVALID_SET_FILE_POINTER) {          if (SetFilePointer(pFile->hFileWrite, ulStartPos + ulPos, NULL/*32 bit*/, FILE_BEGIN) == INVALID_SET_FILE_POINTER) {
368              throw Exception("Could not seek to position " + ToString(ulPos) +              throw Exception("Could not seek to position " + ToString(ulPos) +
369                              " in chunk (" + ToString(ulStartPos + ulPos) + " in file)");                                          " in chunk (" + ToString(ulStartPos + ulPos) + " in file)");
370          }          }
371          DWORD writtenWords;          DWORD writtenWords;
372          WriteFile(pFile->hFileWrite, pData, WordCount * WordSize, &writtenWords, NULL);          WriteFile(pFile->hFileWrite, pData, WordCount * WordSize, &writtenWords, NULL);
# Line 706  namespace RIFF { Line 733  namespace RIFF {
733       * @see ReleaseChunkData()       * @see ReleaseChunkData()
734       */       */
735      void* Chunk::LoadChunkData() {      void* Chunk::LoadChunkData() {
736          if (!pChunkData && pFile->Filename != "") {          if (!pChunkData && pFile->Filename != "" && ulStartPos != 0) {
737              #if POSIX              #if POSIX
738              if (lseek(pFile->hFileRead, ulStartPos, SEEK_SET) == -1) return NULL;              if (lseek(pFile->hFileRead, ulStartPos, SEEK_SET) == -1) return NULL;
739              #elif defined(WIN32)              #elif defined(WIN32)
# Line 775  namespace RIFF { Line 802  namespace RIFF {
802       * @see File::Save()       * @see File::Save()
803       */       */
804      void Chunk::Resize(int iNewSize) {      void Chunk::Resize(int iNewSize) {
805          if (iNewSize <= 0) throw Exception("Chunk size must be at least one byte");          if (iNewSize <= 0)
806                throw Exception("There is at least one empty chunk (zero size): " + __resolveChunkPath(this));
807          if (NewChunkSize == iNewSize) return;          if (NewChunkSize == iNewSize) return;
808          NewChunkSize = iNewSize;          NewChunkSize = iNewSize;
809          pFile->LogAsResized(this);          pFile->LogAsResized(this);
# Line 1132  namespace RIFF { Line 1160  namespace RIFF {
1160          pSubChunks->push_back(pNewChunk);          pSubChunks->push_back(pNewChunk);
1161          (*pSubChunksMap)[uiChunkID] = pNewChunk;          (*pSubChunksMap)[uiChunkID] = pNewChunk;
1162          pNewChunk->Resize(uiBodySize);          pNewChunk->Resize(uiBodySize);
1163            NewChunkSize += CHUNK_HEADER_SIZE;
1164            pFile->LogAsResized(this);
1165          return pNewChunk;          return pNewChunk;
1166      }      }
1167    
# Line 1167  namespace RIFF { Line 1197  namespace RIFF {
1197          List* pNewListChunk = new List(pFile, this, uiListType);          List* pNewListChunk = new List(pFile, this, uiListType);
1198          pSubChunks->push_back(pNewListChunk);          pSubChunks->push_back(pNewListChunk);
1199          (*pSubChunksMap)[CHUNK_ID_LIST] = pNewListChunk;          (*pSubChunksMap)[CHUNK_ID_LIST] = pNewListChunk;
1200            NewChunkSize += LIST_HEADER_SIZE;
1201            pFile->LogAsResized(this);
1202          return pNewListChunk;          return pNewListChunk;
1203      }      }
1204    
# Line 1203  namespace RIFF { Line 1235  namespace RIFF {
1235        std::cout << "List::Readheader(ulong) ";        std::cout << "List::Readheader(ulong) ";
1236        #endif // DEBUG        #endif // DEBUG
1237          Chunk::ReadHeader(fPos);          Chunk::ReadHeader(fPos);
1238            if (CurrentChunkSize < 8) return;
1239          NewChunkSize = CurrentChunkSize -= 4;          NewChunkSize = CurrentChunkSize -= 4;
1240          #if POSIX          #if POSIX
1241          lseek(pFile->hFileRead, fPos + CHUNK_HEADER_SIZE, SEEK_SET);          lseek(pFile->hFileRead, fPos + CHUNK_HEADER_SIZE, SEEK_SET);
# Line 1248  namespace RIFF { Line 1281  namespace RIFF {
1281          if (!pSubChunks) {          if (!pSubChunks) {
1282              pSubChunks    = new ChunkList();              pSubChunks    = new ChunkList();
1283              pSubChunksMap = new ChunkMap();              pSubChunksMap = new ChunkMap();
1284                #if defined(WIN32)
1285                if (pFile->hFileRead == INVALID_HANDLE_VALUE) return;
1286                #else
1287              if (!pFile->hFileRead) return;              if (!pFile->hFileRead) return;
1288                #endif
1289              unsigned long uiOriginalPos = GetPos();              unsigned long uiOriginalPos = GetPos();
1290              SetPos(0); // jump to beginning of list chunk body              SetPos(0); // jump to beginning of list chunk body
1291              while (RemainingBytes() >= CHUNK_HEADER_SIZE) {              while (RemainingBytes() >= CHUNK_HEADER_SIZE) {
# Line 1344  namespace RIFF { Line 1381  namespace RIFF {
1381       * "from scratch". Note: there must be no empty chunks or empty list       * "from scratch". Note: there must be no empty chunks or empty list
1382       * chunks when trying to make the new RIFF file persistent with Save()!       * chunks when trying to make the new RIFF file persistent with Save()!
1383       *       *
1384         * Note: by default, the RIFF file will be saved in native endian
1385         * format; that is, as a RIFF file on little-endian machines and
1386         * as a RIFX file on big-endian. To change this behaviour, call
1387         * SetByteOrder() before calling Save().
1388         *
1389       * @param FileType - four-byte identifier of the RIFF file type       * @param FileType - four-byte identifier of the RIFF file type
1390       * @see AddSubChunk(), AddSubList()       * @see AddSubChunk(), AddSubList(), SetByteOrder()
1391       */       */
1392      File::File(uint32_t FileType) : List(this) {      File::File(uint32_t FileType) : List(this) {
1393          #if defined(WIN32)          #if defined(WIN32)
# Line 1383  namespace RIFF { Line 1425  namespace RIFF {
1425                                       path.c_str(), GENERIC_READ,                                       path.c_str(), GENERIC_READ,
1426                                       FILE_SHARE_READ | FILE_SHARE_WRITE,                                       FILE_SHARE_READ | FILE_SHARE_WRITE,
1427                                       NULL, OPEN_EXISTING,                                       NULL, OPEN_EXISTING,
1428                                       FILE_ATTRIBUTE_NORMAL, NULL                                       FILE_ATTRIBUTE_NORMAL |
1429                                         FILE_FLAG_RANDOM_ACCESS, NULL
1430                                   );                                   );
1431          if (hFileRead == INVALID_HANDLE_VALUE) {          if (hFileRead == INVALID_HANDLE_VALUE) {
1432              hFileRead = hFileWrite = INVALID_HANDLE_VALUE;              hFileRead = hFileWrite = INVALID_HANDLE_VALUE;
# Line 1396  namespace RIFF { Line 1439  namespace RIFF {
1439          Mode = stream_mode_read;          Mode = stream_mode_read;
1440          ulStartPos = RIFF_HEADER_SIZE;          ulStartPos = RIFF_HEADER_SIZE;
1441          ReadHeader(0);          ReadHeader(0);
1442          if (ChunkID != CHUNK_ID_RIFF) {          if (ChunkID != CHUNK_ID_RIFF && ChunkID != CHUNK_ID_RIFX) {
1443              throw RIFF::Exception("Not a RIFF file");              throw RIFF::Exception("Not a RIFF file");
1444          }          }
1445      }      }
# Line 1436  namespace RIFF { Line 1479  namespace RIFF {
1479                                                   Filename.c_str(), GENERIC_READ,                                                   Filename.c_str(), GENERIC_READ,
1480                                                   FILE_SHARE_READ | FILE_SHARE_WRITE,                                                   FILE_SHARE_READ | FILE_SHARE_WRITE,
1481                                                   NULL, OPEN_EXISTING,                                                   NULL, OPEN_EXISTING,
1482                                                   FILE_ATTRIBUTE_NORMAL, NULL                                                   FILE_ATTRIBUTE_NORMAL |
1483                                                     FILE_FLAG_RANDOM_ACCESS,
1484                                                     NULL
1485                                               );                                               );
1486                      if (hFileRead == INVALID_HANDLE_VALUE) {                      if (hFileRead == INVALID_HANDLE_VALUE) {
1487                          hFileRead = hFileWrite = INVALID_HANDLE_VALUE;                          hFileRead = hFileWrite = INVALID_HANDLE_VALUE;
# Line 1464  namespace RIFF { Line 1509  namespace RIFF {
1509                                                   GENERIC_READ | GENERIC_WRITE,                                                   GENERIC_READ | GENERIC_WRITE,
1510                                                   FILE_SHARE_READ,                                                   FILE_SHARE_READ,
1511                                                   NULL, OPEN_ALWAYS,                                                   NULL, OPEN_ALWAYS,
1512                                                   FILE_ATTRIBUTE_NORMAL, NULL                                                   FILE_ATTRIBUTE_NORMAL |
1513                                                     FILE_FLAG_RANDOM_ACCESS,
1514                                                     NULL
1515                                               );                                               );
1516                      if (hFileRead == INVALID_HANDLE_VALUE) {                      if (hFileRead == INVALID_HANDLE_VALUE) {
1517                          hFileRead = hFileWrite = CreateFile(                          hFileRead = hFileWrite = CreateFile(
1518                                                       Filename.c_str(), GENERIC_READ,                                                       Filename.c_str(), GENERIC_READ,
1519                                                       FILE_SHARE_READ | FILE_SHARE_WRITE,                                                       FILE_SHARE_READ | FILE_SHARE_WRITE,
1520                                                       NULL, OPEN_EXISTING,                                                       NULL, OPEN_EXISTING,
1521                                                       FILE_ATTRIBUTE_NORMAL, NULL                                                       FILE_ATTRIBUTE_NORMAL |
1522                                                         FILE_FLAG_RANDOM_ACCESS,
1523                                                         NULL
1524                                                   );                                                   );
1525                          throw Exception("Could not (re)open file \"" + Filename + "\" in read mode");                          throw Exception("Could not (re)open file \"" + Filename + "\" in read+write mode");
1526                      }                      }
1527                      #else                      #else
1528                      if (hFileRead) fclose(hFileRead);                      if (hFileRead) fclose(hFileRead);
# Line 1507  namespace RIFF { Line 1556  namespace RIFF {
1556          return false;          return false;
1557      }      }
1558    
1559        /** @brief Set the byte order to be used when saving.
1560         *
1561         * Set the byte order to be used in the file. A value of
1562         * endian_little will create a RIFF file, endian_big a RIFX file
1563         * and endian_native will create a RIFF file on little-endian
1564         * machines and RIFX on big-endian machines.
1565         *
1566         * @param Endian - endianess to use when file is saved.
1567         */
1568        void File::SetByteOrder(endian_t Endian) {
1569            #if WORDS_BIGENDIAN
1570            bEndianNative = Endian != endian_little;
1571            #else
1572            bEndianNative = Endian != endian_big;
1573            #endif
1574        }
1575    
1576      /** @brief Save changes to same file.      /** @brief Save changes to same file.
1577       *       *
1578       * Make all changes of all chunks persistent by writing them to the       * Make all changes of all chunks persistent by writing them to the
# Line 1533  namespace RIFF { Line 1599  namespace RIFF {
1599    
1600          // first we sum up all positive chunk size changes (and skip all negative ones)          // first we sum up all positive chunk size changes (and skip all negative ones)
1601          unsigned long ulPositiveSizeDiff = 0;          unsigned long ulPositiveSizeDiff = 0;
1602          for (ChunkList::iterator iter = ResizedChunks.begin(), end = ResizedChunks.end(); iter != end; ++iter) {          for (std::set<Chunk*>::const_iterator iter = ResizedChunks.begin(), end = ResizedChunks.end(); iter != end; ++iter) {
1603              if ((*iter)->GetNewSize() == 0) {              if ((*iter)->GetNewSize() == 0) {
1604                  // just to make the exception message a bit more verbose: resolve the chunk's path                  throw Exception("There is at least one empty chunk (zero size): " + __resolveChunkPath(*iter));
                 String sChunkPath;  
                 for (Chunk* pChunk = *iter; pChunk; pChunk = pChunk->GetParent()) {  
                     if (pChunk->GetChunkID() == CHUNK_ID_LIST) {  
                         List* pList = (List*) pChunk;  
                         sChunkPath = "->'" + pList->GetListTypeString() + "'" + sChunkPath;  
                     } else {  
                         sChunkPath = "->'" + pChunk->GetChunkIDString() + "'" + sChunkPath;  
                     }  
                 }  
                 throw Exception("There is at least one empty chunk (zero size): " + sChunkPath);  
             }  
             if ((*iter)->GetNewSize() + 1L > (*iter)->GetSize()) {  
                 unsigned long ulDiff = (*iter)->GetNewSize() - (*iter)->GetSize() + 1L; // +1 in case we have to add a pad byte  
                 ulPositiveSizeDiff += ulDiff;  
1605              }              }
1606                unsigned long newSizePadded = (*iter)->GetNewSize() + (*iter)->GetNewSize() % 2;
1607                unsigned long oldSizePadded = (*iter)->GetSize() + (*iter)->GetSize() % 2;
1608                if (newSizePadded > oldSizePadded) ulPositiveSizeDiff += newSizePadded - oldSizePadded;
1609          }          }
1610    
1611          unsigned long ulWorkingFileSize = GetFileSize();          unsigned long ulWorkingFileSize = GetFileSize();
# Line 1566  namespace RIFF { Line 1621  namespace RIFF {
1621              #if defined(WIN32)              #if defined(WIN32)
1622              DWORD iBytesMoved = 1; // we have to pass it via pointer to the Windows API, thus the correct size must be ensured              DWORD iBytesMoved = 1; // we have to pass it via pointer to the Windows API, thus the correct size must be ensured
1623              #else              #else
1624              int iBytesMoved = 1;              int iBytesMoved = 1;
1625              #endif              #endif
1626              for (unsigned long ulPos = 0; iBytesMoved > 0; ulPos += iBytesMoved) {              for (unsigned long ulPos = ulFileSize; iBytesMoved > 0; ) {
1627                  const unsigned long ulToMove = ulFileSize - ulPos;                  iBytesMoved = (ulPos < 4096) ? ulPos : 4096;
1628                  iBytesMoved = (ulToMove < 4096) ? ulToMove : 4096;                  ulPos -= iBytesMoved;
1629                  #if POSIX                  #if POSIX
1630                  lseek(hFileRead, ulPos, SEEK_SET);                  lseek(hFileRead, ulPos, SEEK_SET);
1631                  iBytesMoved = read(hFileRead, pCopyBuffer, iBytesMoved);                  iBytesMoved = read(hFileRead, pCopyBuffer, iBytesMoved);
# Line 1633  namespace RIFF { Line 1688  namespace RIFF {
1688          #elif defined(WIN32)          #elif defined(WIN32)
1689          hFileWrite = CreateFile(          hFileWrite = CreateFile(
1690                           path.c_str(), GENERIC_WRITE, FILE_SHARE_READ,                           path.c_str(), GENERIC_WRITE, FILE_SHARE_READ,
1691                           NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL                           NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL |
1692                             FILE_FLAG_RANDOM_ACCESS, NULL
1693                       );                       );
1694          if (hFileWrite == INVALID_HANDLE_VALUE) {          if (hFileWrite == INVALID_HANDLE_VALUE) {
1695              hFileWrite = hFileRead;              hFileWrite = hFileRead;
# Line 1658  namespace RIFF { Line 1714  namespace RIFF {
1714          // forget all resized chunks          // forget all resized chunks
1715          ResizedChunks.clear();          ResizedChunks.clear();
1716    
1717          if (Filename.length() > 0) {          #if POSIX
1718              #if POSIX          if (hFileWrite) close(hFileWrite);
1719              close(hFileWrite);          #elif defined(WIN32)
1720              #elif defined(WIN32)          if (hFileWrite != INVALID_HANDLE_VALUE) CloseHandle(hFileWrite);
1721              CloseHandle(hFileWrite);          #else
1722              #else          if (hFileWrite) fclose(hFileWrite);
1723              fclose(hFileWrite);          #endif
1724              #endif          hFileWrite = hFileRead;
             hFileWrite = hFileRead;  
         }  
1725    
1726          // associate new file with this File object from now on          // associate new file with this File object from now on
1727          Filename = path;          Filename = path;
# Line 1704  namespace RIFF { Line 1758  namespace RIFF {
1758      }      }
1759    
1760      void File::LogAsResized(Chunk* pResizedChunk) {      void File::LogAsResized(Chunk* pResizedChunk) {
1761          ResizedChunks.push_back(pResizedChunk);          ResizedChunks.insert(pResizedChunk);
1762      }      }
1763    
1764      void File::UnlogResized(Chunk* pResizedChunk) {      void File::UnlogResized(Chunk* pResizedChunk) {
1765          ResizedChunks.remove(pResizedChunk);          ResizedChunks.erase(pResizedChunk);
1766      }      }
1767    
1768      unsigned long File::GetFileSize() {      unsigned long File::GetFileSize() {

Legend:
Removed from v.1102  
changed lines
  Added in v.1863

  ViewVC Help
Powered by ViewVC