From a657069cc53cc05245762e9323efa040a9f70da2 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Tue, 8 Dec 2009 08:06:44 +0000 Subject: Checked in SebHoll's API mods, fixed indents. o Added user_data() to Fl_Tree_Item o Added insert() and add() methods that allow specification of Fl_Tree_Prefs o Changed Fl_Pixmap args to Fl_Image for more flexibility o Fixes for positioning of items in the presence of user icons o find_children() changed from protected -> public git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6956 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Tree_Item_Array.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Fl_Tree_Item_Array.cxx') diff --git a/src/Fl_Tree_Item_Array.cxx b/src/Fl_Tree_Item_Array.cxx index be0216b44..5f37ce8e2 100644 --- a/src/Fl_Tree_Item_Array.cxx +++ b/src/Fl_Tree_Item_Array.cxx @@ -68,8 +68,8 @@ Fl_Tree_Item_Array::Fl_Tree_Item_Array(const Fl_Tree_Item_Array* o) { void Fl_Tree_Item_Array::clear() { if ( _items ) { for ( int t=0; t<_total; t++ ) { - delete _items[t]; - _items[t] = 0; + delete _items[t]; + _items[t] = 0; } free((void*)_items); _items = 0; } @@ -88,9 +88,9 @@ void Fl_Tree_Item_Array::enlarge(int count) { int newsize = _size + _chunksize; Fl_Tree_Item **newitems = (Fl_Tree_Item**)malloc(newsize * sizeof(Fl_Tree_Item*)); if ( _items ) { - // Copy old array -> new, delete old - memmove(newitems, _items, _size * sizeof(Fl_Tree_Item*)); - free((void*)_items); _items = 0; + // Copy old array -> new, delete old + memmove(newitems, _items, _size * sizeof(Fl_Tree_Item*)); + free((void*)_items); _items = 0; } // Adjust items/sizeitems _items = newitems; @@ -145,8 +145,8 @@ void Fl_Tree_Item_Array::remove(int index) { int Fl_Tree_Item_Array::remove(Fl_Tree_Item *item) { for ( int t=0; t<_total; t++ ) { if ( item == _items[t] ) { - remove(t); - return(0); + remove(t); + return(0); } } return(-1); -- cgit v1.2.3