COIN-OR::LEMON - Graph Library

Changeset 1887:22fdc00894aa in lemon-0.x


Ignore:
Timestamp:
01/09/06 13:41:06 (18 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2462
Message:

The tree that is created for evaluation of expression string at new map creation is deleted after usage.

Location:
gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gui/new_map_win.cc

    r1884 r1887  
    160160              //display it
    161161              //gdc.changeEdgeText(mapname);
    162 
    163               //delete emptr;
    164162            }
    165163          else //!edge.get_active()
     
    241239              //display it
    242240              //gdc.changeNodeText(mapname);
    243 
    244               //delete emptr;
    245241            }
    246242          if(!abortion)
     
    375371      std::string polishform=postOrder(root);
    376372
     373      deleteTree(root);
     374
    377375      return polishform;
    378376    }
    379377  return "";
     378}
     379
     380void NewMapWin::deleteTree(NewMapWin::tree_node * node)
     381{
     382  if(node->left_child!=NULL)
     383    {
     384      deleteTree(node->left_child);
     385    }
     386  if(node->right_child!=NULL)
     387    {
     388      deleteTree(node->right_child);
     389    }
     390  delete node;
    380391}
    381392
  • gui/new_map_win.h

    r1849 r1887  
    2929  ///Constructor of NewMapWin creates the widgets shown in NewMapWin.
    3030  NewMapWin(const std::string& title, NoteBookTab &, bool itisedge=true, bool edgenode=true);
    31  
     31
    3232  ///Signal on button is connected to this function,
    3333  ///Therefore this function determines whether to
     
    4848  bool validVariable(std::string, bool);
    4949
     50  void deleteTree(tree_node *);
     51
    5052  std::map<char, std::string> ch2var;
    5153
Note: See TracChangeset for help on using the changeset viewer.