Commit 161d1954 authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@371 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 14e7f0b3
......@@ -29,10 +29,10 @@ flext::AtomList::AtomList(const AtomList &a):
flext::AtomList::~AtomList() { Clear(); }
flext::AtomList &flext::AtomList::Set(int argc,const t_atom *argv,int offs)
flext::AtomList &flext::AtomList::Set(int argc,const t_atom *argv,int offs,bool resize)
{
int ncnt = argc+offs;
if(lst && cnt != ncnt) { delete[] lst; lst = NULL; cnt = 0; }
if(resize && lst && cnt != ncnt) { delete[] lst; lst = NULL; cnt = 0; }
if(ncnt) {
if(!lst) lst = new t_atom[cnt = ncnt];
......
......@@ -280,12 +280,12 @@ public:
AtomList &Clear() { return operator()(); }
//! Set list
AtomList &Set(int argc,const t_atom *argv,int offs = 0);
AtomList &Set(int argc,const t_atom *argv,int offs = 0,bool resize = false);
//! Get list
int Get(t_atom *argv,int mxsz = -1) const;
//! Set list
AtomList &operator()(int argc = 0,const t_atom *argv = NULL) { return Set(argc,argv); }
AtomList &operator()(int argc = 0,const t_atom *argv = NULL) { return Set(argc,argv,0,true); }
//! Set list by another AtomList
AtomList &operator =(const AtomList &a) { return operator()(a.Count(),a.Atoms()); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment