aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/flext/source')
-rwxr-xr-xexternals/grill/flext/source/flatom_part.cpp4
-rw-r--r--externals/grill/flext/source/flmap.h2
-rw-r--r--externals/grill/flext/source/flsupport.h26
3 files changed, 16 insertions, 16 deletions
diff --git a/externals/grill/flext/source/flatom_part.cpp b/externals/grill/flext/source/flatom_part.cpp
index 9f648e59..b6d4661c 100755
--- a/externals/grill/flext/source/flatom_part.cpp
+++ b/externals/grill/flext/source/flatom_part.cpp
@@ -25,13 +25,13 @@ int flext::AtomList::Get(t_atom *argv,int mxsz) const
}
-flext::AtomList flext::AtomList::GetPart(int offs,int len) const
+void flext::AtomList::GetPart(int offs,int len,AtomList &ret) const
{
if(offs+len > Count()) {
len = Count()-offs;
if(len < 0) len = 0;
}
- return AtomList(len,Atoms()+offs);
+ ret(len,Atoms()+offs);
}
diff --git a/externals/grill/flext/source/flmap.h b/externals/grill/flext/source/flmap.h
index fed5390a..4c3a1c9e 100644
--- a/externals/grill/flext/source/flmap.h
+++ b/externals/grill/flext/source/flmap.h
@@ -194,7 +194,7 @@ private:
const int tsize;
Data *const data;
- int count,n;
+ int n,count;
TableAnyMap *parent,*left,*right;
int _tryix(size_t k) const
diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h
index c1f9d8f3..ead75804 100644
--- a/externals/grill/flext/source/flsupport.h
+++ b/externals/grill/flext/source/flsupport.h
@@ -563,11 +563,11 @@ public:
{
public:
//! Construct list
- AtomList(): cnt(0),lst(NULL) {}
+ explicit AtomList(): cnt(0),lst(NULL) {}
//! Construct list
- AtomList(int argc,const t_atom *argv = NULL): cnt(0),lst(NULL) { operator()(argc,argv); }
+ explicit AtomList(int argc,const t_atom *argv = NULL): cnt(0),lst(NULL) { operator()(argc,argv); }
//! Construct list
- AtomList(const AtomList &a): cnt(0),lst(NULL) { operator =(a); }
+ explicit AtomList(const AtomList &a): cnt(0),lst(NULL) { operator =(a); }
//! Destroy list
virtual ~AtomList();
@@ -634,9 +634,9 @@ public:
AtomList &Prepend(const AtomList &a) { return Prepend(a.Count(),a.Atoms()); }
//! Get a part of the list
- AtomList GetPart(int offs,int len) const;
+ void GetPart(int offs,int len,AtomList &ret) const;
//! Set to a part of the list
- AtomList &Part(int offs,int len) { return (*this = GetPart(offs,len)); }
+ AtomList &Part(int offs,int len) { GetPart(offs,len,*this); return *this; }
//! Represent as a string
bool Print(char *buffer,int buflen) const { return flext::PrintList(Count(),Atoms(),buffer,buflen); }
@@ -653,7 +653,7 @@ public:
: public AtomList
{
protected:
- AtomListStaticBase(int pc,t_atom *dt): precnt(pc),predata(dt) {}
+ explicit AtomListStaticBase(int pc,t_atom *dt): precnt(pc),predata(dt) {}
virtual ~AtomListStaticBase();
virtual void Alloc(int sz,int keepix = -1,int keeplen = -1,int keepto = 0);
virtual void Free();
@@ -668,14 +668,14 @@ public:
{
public:
//! Construct list
- AtomListStatic(): AtomListStaticBase(PRE,pre) {}
+ explicit AtomListStatic(): AtomListStaticBase(PRE,pre) {}
//! Construct list
- AtomListStatic(int argc,const t_atom *argv = NULL): AtomListStaticBase(PRE,pre) { operator()(argc,argv); }
+ explicit AtomListStatic(int argc,const t_atom *argv = NULL): AtomListStaticBase(PRE,pre) { operator()(argc,argv); }
//! Construct list
- AtomListStatic(const AtomList &a): AtomListStaticBase(PRE,pre) { operator =(a); }
+ explicit AtomListStatic(const AtomList &a): AtomListStaticBase(PRE,pre) { AtomList::operator =(a); }
//! Set list by another AtomList
- AtomListStatic &operator =(const AtomListStatic &a) { AtomListStaticBase::operator =(a); return *this; }
+ AtomListStatic &operator =(const AtomListStatic &a) { AtomList::operator =(a); return *this; }
protected:
t_atom pre[PRE];
};
@@ -685,15 +685,15 @@ public:
public AtomList
{
public:
- AtomAnything(): hdr(NULL) {}
+ explicit AtomAnything(): hdr(NULL) {}
#if FLEXT_SYS != FLEXT_SYS_JMAX
//! Construct anything
- AtomAnything(const t_symbol *h,int argc = 0,const t_atom *argv = NULL)
+ explicit AtomAnything(const t_symbol *h,int argc = 0,const t_atom *argv = NULL)
: AtomList(argc,argv),hdr(h?h:sym__)
{}
#endif
//! Construct anything
- AtomAnything(const char *h,int argc = 0,const t_atom *argv = NULL)
+ explicit AtomAnything(const char *h,int argc = 0,const t_atom *argv = NULL)
: AtomList(argc,argv),hdr(MakeSymbol(h))
{}