LCOV - code coverage report
Current view: top level - src - IntSet.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 9 9 100.0 %
Date: 2010-12-13 Functions: 1 1 100.0 %
Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : // $Id: IntSet.cc 80 2004-07-14 20:15:50Z jason $
       2                 :            : 
       3                 :            : #include "config.h"
       4                 :            : 
       5                 :            : #ifdef HAVE_MEMORY_H
       6                 :            : #include <memory.h>
       7                 :            : #endif
       8                 :            : #include <stdlib.h>
       9                 :            : 
      10                 :            : #include "IntSet.h"
      11                 :            : 
      12                 :        885 : void IntSet::Expand(unsigned int i)
      13                 :            :         {
      14                 :        885 :         unsigned int newsize = i / 8 + 1;
      15                 :        885 :         unsigned char* newset = new unsigned char[newsize];
      16                 :            : 
      17                 :        885 :         memset(newset, 0, newsize);
      18                 :        885 :         memcpy(newset, set, size);
      19                 :            : 
      20         [ +  - ]:        885 :         delete [] set;
      21                 :        885 :         size = newsize;
      22                 :        885 :         set = newset;
      23                 :        885 :         }

Generated by: LCOV version 1.8