diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-03-25 04:52:21 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-03-25 04:52:21 +0000 |
commit | 03df01d81c2db0c7234833fce06fcdd7f0aae8e0 (patch) | |
tree | 5535f3040ff277459878342f556c6ccb9cf558e0 /externals/grill/flext/source | |
parent | 848cad880af05c8c1153c21503d434eaaf8eab95 (diff) |
optimized AtomList functions
minor fixes for Max
fixes for OSX
small update of linkage styles etc.
updated the docs
new: FLEXT_WARN, FLEXT_ERROR macros
svn path=/trunk/; revision=2642
Diffstat (limited to 'externals/grill/flext/source')
-rw-r--r-- | externals/grill/flext/source/flmap.h | 6 | ||||
-rw-r--r-- | externals/grill/flext/source/flsupport.cpp | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/externals/grill/flext/source/flmap.h b/externals/grill/flext/source/flmap.h index 50c81b20..bcf67c46 100644 --- a/externals/grill/flext/source/flmap.h +++ b/externals/grill/flext/source/flmap.h @@ -94,8 +94,8 @@ protected: void *value; }; - TableAnyMap(TableAnyMap *p,int mx,Data *dt,bool o) - : owned(o),max(mx),data(dt) + TableAnyMap(TableAnyMap *p,int sz,Data *dt,bool o) + : owned(o),tsize(sz),data(dt) , n(0),parent(p),left(NULL),right(NULL) {} @@ -143,7 +143,7 @@ protected: void *_find(size_t k); const bool owned; - const int max; + const int tsize; Data *const data; int n; TableAnyMap *parent,*left,*right; diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp index 004e8627..53821157 100644 --- a/externals/grill/flext/source/flsupport.cpp +++ b/externals/grill/flext/source/flsupport.cpp @@ -321,7 +321,7 @@ void TableAnyMap::clear() int TableAnyMap::size() const { int sz = n; - if(sz >= max) { + if(sz >= tsize) { if(left) sz += left->size(); if(right) sz += right->size(); } @@ -332,14 +332,14 @@ void TableAnyMap::_set(size_t k,void *t) { FLEXT_ASSERT(n); - if(n < max) { + if(n < tsize) { // fall through } else if(k < data[0].key) { _toleft(k,t); return; } - else if(k > data[max-1].key) { + else if(k > data[tsize-1].key) { _toright(k,t); return; } @@ -379,8 +379,8 @@ void TableAnyMap::_set(size_t k,void *t) else { // insert new slot by shifting the higher ones FLEXT_ASSERT(k < dk); - if(n == max) - _toright(data[max-1]); + if(n == tsize) + _toright(data[tsize-1]); else ++n; @@ -393,7 +393,7 @@ void TableAnyMap::_set(size_t k,void *t) void *TableAnyMap::_find(size_t k) { FLEXT_ASSERT(n); - if(n < max) { + if(n < tsize) { // fall through } else if(k < data[0].key) |