Changeset 22141

Show
Ignore:
Timestamp:
20.05.2010 20:51:21 (9 years ago)
Author:
davidb
Message:

Was surprised to discover some classes that did not correctly specify virtual on its destructor, even though virutal was being used on other methods in the class, or else through inheritance. Now fixed up.

Location:
main/trunk/greenstone2/common-src/src/lib
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/src/lib/gsdlunicode.cpp

    r21325 r22141  
    127127} 
    128128 
     129utf8inconvertclass::~utf8inconvertclass () { 
     130  // nothing to do 
     131} 
     132 
    129133void utf8inconvertclass::reset () { 
    130134  start = NULL; 
  • main/trunk/greenstone2/common-src/src/lib/gsdlunicode.h

    r8666 r22141  
    4646public: 
    4747  utf8inconvertclass(); 
    48   void reset (); 
    49   void convert (text_t &output, status_t &status); 
     48  virtual ~utf8inconvertclass(); 
     49 
     50  virtual void reset (); 
     51  virtual void convert (text_t &output, status_t &status); 
    5052 
    5153protected: 
     
    7072public: 
    7173  rzwsoutconvertclass () {rzws = 0;}; 
     74  virtual ~rzwsoutconvertclass () {}; 
     75 
    7276  void set_rzws (int new_rzws) {rzws = new_rzws;}; 
    7377 
     
    8084public: 
    8185  utf16outconvertclass () {}; 
    82   void convert (char *out, size_t maxlen, size_t &len, status_t &status); 
     86  virtual ~utf16outconvertclass () {}; 
     87 
     88  virtual void convert (char *out, size_t maxlen, size_t &len, status_t &status); 
    8389}; 
    8490 
     
    8894public: 
    8995  utf8outconvertclass () {utf8buflen=0; utf8bufhere=0;}; 
    90   void reset (); 
     96  virtual ~utf8outconvertclass () {}; 
     97 
     98  virtual void reset (); 
    9199  // note that convert does not null-terminate the 
    92100  // output array of characters 
  • main/trunk/greenstone2/common-src/src/lib/text_t.cpp

    r20762 r22141  
    724724} 
    725725 
     726convertclass::~convertclass ()  
     727{ 
     728  // nothing to do 
     729} 
     730 
    726731void convertclass::reset () 
    727732{ 
     
    742747  start = NULL; 
    743748  len = 0; 
     749} 
     750 
     751inconvertclass::~inconvertclass ()  
     752{ 
     753  // nothing to do 
    744754} 
    745755 
     
    845855} 
    846856 
     857outconvertclass::~outconvertclass ()  
     858{ 
     859  // nothing to do 
     860} 
     861 
     862 
    847863void outconvertclass::reset () 
    848864{ 
  • main/trunk/greenstone2/common-src/src/lib/text_t.h

    r18880 r22141  
    298298   
    299299  convertclass (); 
     300  virtual ~convertclass (); 
    300301  virtual void reset (); 
    301302}; 
     
    310311public: 
    311312  inconvertclass (); 
    312   void reset (); 
     313  ~inconvertclass (); 
     314 
     315  virtual void reset (); 
    313316  void setinput (char *thestart, size_t thelen); 
    314317 
     
    351354public: 
    352355  outconvertclass (); 
     356  ~outconvertclass (); 
     357 
    353358  virtual void reset (); 
    354359  virtual void setinput (text_t *theinput);