aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/flext/source')
-rw-r--r--externals/grill/flext/source/flmap.h6
-rw-r--r--externals/grill/flext/source/flsupport.cpp12
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)