Changeset 7705:877bf8232fe3 in orange for source/orange/vars.cpp


Ignore:
Timestamp:
02/22/11 13:29:04 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
862b9a9ebf54279b352cedec55cb38b199ee50ed
Message:

tvariable delete operator changed to destructor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/vars.cpp

    r7667 r7705  
    8282   MMV::iterator it; 
    8383  
    84    for (it=rp.first; it!=rp.second; ++it) { 
    85   
     84   for (it=rp.first; it!=rp.second; ++it) {  
    8685     if ((it->second)->varType == varType) { 
    8786 
     
    227226void TVariable::removeVariable() { 
    228227      pair<MMV::iterator,MMV::iterator> rp = allVariablesMap.equal_range(name); 
    229       MMV::iterator it; 
     228      MMV::iterator it; 
    230229 
    231230      for (it=rp.first; it!=rp.second; ++it) { 
    232           if (it->second == this) { 
    233               allVariablesMap.erase(it); 
     231          if (it->second == this) { 
     232              allVariablesMap.erase(it); 
    234233              break; 
    235234          } 
     
    237236} 
    238237 
    239 void TVariable::operator delete(void *t) 
     238TVariable::~TVariable() 
    240239{ 
    241240    /* When the program shuts down, it may happen that the list is destroyed before 
    242241       the variables. We do nothing in this case. */ 
    243242    if (allVariablesMap.size()) { 
    244         ((TVariable *)t)->removeVariable(); 
    245     } 
    246        
    247     ::operator delete(t); 
     243        removeVariable(); 
     244    } 
    248245} 
    249246 
Note: See TracChangeset for help on using the changeset viewer.