From e728a5bc3db296b4b67c2d3e5b56558c42c566a8 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 21 Jun 2004 14:08:57 +0000 Subject: "" svn path=/trunk/; revision=1826 --- externals/grill/flext/source/flatom_app.cpp | 80 ++++++++++++++--------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'externals/grill/flext/source/flatom_app.cpp') diff --git a/externals/grill/flext/source/flatom_app.cpp b/externals/grill/flext/source/flatom_app.cpp index 90b4af82..96fe010d 100755 --- a/externals/grill/flext/source/flatom_app.cpp +++ b/externals/grill/flext/source/flatom_app.cpp @@ -17,60 +17,60 @@ WARRANTIES, see the file, "license.txt," in this distribution. flext::AtomList &flext::AtomList::Append(const t_atom &a) { - t_atom *nlst = new t_atom[cnt+1]; - for(int i = 0; i < cnt; ++i) SetAtom(nlst[i],lst[i]); - SetAtom(nlst[cnt],a); - - if(lst) delete[] lst; - lst = nlst; - ++cnt; + t_atom *nlst = new t_atom[cnt+1]; + for(int i = 0; i < cnt; ++i) SetAtom(nlst[i],lst[i]); + SetAtom(nlst[cnt],a); + + if(lst) delete[] lst; + lst = nlst; + ++cnt; - return *this; + return *this; } flext::AtomList &flext::AtomList::Append(int argc,const t_atom *argv) { - if(argc) { - t_atom *nlst = new t_atom[cnt+argc]; - int i; - for(i = 0; i < cnt; ++i) SetAtom(nlst[i],lst[i]); - if(argv) - for(i = 0; i < argc; ++i) SetAtom(nlst[cnt+i],argv[i]); - - if(lst) delete[] lst; - lst = nlst; - cnt += argc; - } - return *this; + if(argc) { + t_atom *nlst = new t_atom[cnt+argc]; + int i; + for(i = 0; i < cnt; ++i) SetAtom(nlst[i],lst[i]); + if(argv) + for(i = 0; i < argc; ++i) SetAtom(nlst[cnt+i],argv[i]); + + if(lst) delete[] lst; + lst = nlst; + cnt += argc; + } + return *this; } flext::AtomList &flext::AtomList::Prepend(const t_atom &a) { - t_atom *nlst = new t_atom[cnt+1]; - for(int i = 0; i < cnt; ++i) SetAtom(nlst[i+1],lst[i]); - SetAtom(nlst[0],a); - - if(lst) delete[] lst; - lst = nlst; - ++cnt; + t_atom *nlst = new t_atom[cnt+1]; + for(int i = 0; i < cnt; ++i) SetAtom(nlst[i+1],lst[i]); + SetAtom(nlst[0],a); + + if(lst) delete[] lst; + lst = nlst; + ++cnt; - return *this; + return *this; } flext::AtomList &flext::AtomList::Prepend(int argc,const t_atom *argv) { - if(argc) { - t_atom *nlst = new t_atom[cnt+argc]; - int i; + if(argc) { + t_atom *nlst = new t_atom[cnt+argc]; + int i; - if(argv) - for(i = 0; i < argc; ++i) SetAtom(nlst[i],argv[i]); - for(i = 0; i < cnt; ++i) SetAtom(nlst[argc+i],lst[i]); - - if(lst) delete[] lst; - lst = nlst; - cnt += argc; - } - return *this; + if(argv) + for(i = 0; i < argc; ++i) SetAtom(nlst[i],argv[i]); + for(i = 0; i < cnt; ++i) SetAtom(nlst[argc+i],lst[i]); + + if(lst) delete[] lst; + lst = nlst; + cnt += argc; + } + return *this; } -- cgit v1.2.1