diff options
| author | Greg Ercolano <erco@seriss.com> | 2009-12-08 08:06:44 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2009-12-08 08:06:44 +0000 |
| commit | a657069cc53cc05245762e9323efa040a9f70da2 (patch) | |
| tree | c007a095998f8a4d20ed4359eb7174803c4f8784 /src/Fl_Tree_Item_Array.cxx | |
| parent | 5bc48808b6aed5469c3e62e1402e10c797a5d02a (diff) | |
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
Diffstat (limited to 'src/Fl_Tree_Item_Array.cxx')
| -rw-r--r-- | src/Fl_Tree_Item_Array.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
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); |
