~ubuntu-branches/ubuntu/vivid/unrar-nonfree/vivid

« back to all changes in this revision

Viewing changes to unpack50frag.cpp

  • Committer: Package Import Robot
  • Author(s): Martin Meredith
  • Date: 2015-02-03 12:58:01 UTC
  • mfrom: (1.1.18) (5.1.18 sid)
  • Revision ID: package-import@ubuntu.com-20150203125801-od6ev8cqy1er51vz
Tags: 1:5.2.5-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
FragmentedWindow::~FragmentedWindow()
9
9
{
 
10
  Reset();
 
11
}
 
12
 
 
13
 
 
14
void FragmentedWindow::Reset()
 
15
{
10
16
  for (uint I=0;I<ASIZE(Mem);I++)
11
17
    if (Mem[I]!=NULL)
 
18
    {
12
19
      free(Mem[I]);
 
20
      Mem[I]=NULL;
 
21
    }
13
22
}
14
23
 
15
24
 
16
25
void FragmentedWindow::Init(size_t WinSize)
17
26
{
 
27
  Reset();
 
28
 
18
29
  uint BlockNum=0;
19
30
  size_t TotalSize=0; // Already allocated.
20
31
  while (TotalSize<WinSize && BlockNum<ASIZE(Mem))