summaryrefslogtreecommitdiff
path: root/src/Fl_Tree_Item_Array.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Tree_Item_Array.cxx')
-rw-r--r--src/Fl_Tree_Item_Array.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Fl_Tree_Item_Array.cxx b/src/Fl_Tree_Item_Array.cxx
index 6f338a70e..358306a27 100644
--- a/src/Fl_Tree_Item_Array.cxx
+++ b/src/Fl_Tree_Item_Array.cxx
@@ -79,6 +79,7 @@ void Fl_Tree_Item_Array::clear() {
void Fl_Tree_Item_Array::enlarge(int count) {
int newtotal = _total + count; // new total
if ( newtotal >= _size ) { // more than we have allocated?
+ if ( (newtotal/150) > _chunksize ) _chunksize *= 10;
// Increase size of array
int newsize = _size + _chunksize;
Fl_Tree_Item **newitems = (Fl_Tree_Item**)malloc(newsize * sizeof(Fl_Tree_Item*));