aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-04-09 21:09:01 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-04-09 21:09:01 +0000
commitd2744cd4b8d9bef38086526e8e487bafed1fad84 (patch)
tree597d36ca2a1859a3511a2f7b0c3248f0683cd779 /externals/grill/flext
parent4df086cf574b5ed0c34b4e794c80533d21bc1884 (diff)
optimized AtomList functions
temporary fixes for VASP compilation updates for batch mode fixes for OSX updated build system fixed timer1 tutorial project oops, forgot about SIMD for Windows fixed compilation with SIMD instructions added shared library build facility for Windows fixed shared library versioning fixed flext::Timer::At method build system: added profiler mode, more fixes moved FLEXT_SHARE definition smaller changes to TableMap small optimizations new: FLEXT_WARN, FLEXT_ERROR macros win32 threading model included fixes for Max compilation svn path=/trunk/; revision=2706
Diffstat (limited to 'externals/grill/flext')
-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))
{}