- Timestamp:
- 07/02/13 22:29:54 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/gdk/paramobj.cpp
r81 r91 94 94 int n=tab->flags; 95 95 if (!n) return 0; 96 ExtValue *ret,*v; 97 ret=v=(ExtValue*)malloc( sizeof(ExtValue)*(n+1) ); 98 for (int i=0;i<=n;i++,v++) 99 new(v) ExtValue; 96 ExtValue *ret=new ExtValue[n+1]; 100 97 ret->setInt(n); 101 v=ret+1;98 ExtValue *v=ret+1; 102 99 tab+=tab->group; 103 100 for (;n>0;n--,v++,tab++) … … 126 123 void* ParamObject::dupObject(void* src) 127 124 { 128 if (!src) return 0;125 if (!src) return NULL; 129 126 ExtValue *s=(ExtValue *)src; 130 127 int n=s->getInt(); … … 144 141 { 145 142 if (!obj) return; 146 ExtValue *o=(ExtValue *)obj,*t=o+1; 147 int n=o->getInt(); 148 for (int i=0;i<n;i++,t++) 149 t -> ~ExtValue(); 150 free(obj); 143 delete[] (ExtValue *)obj; 151 144 } 152 145
Note: See TracChangeset
for help on using the changeset viewer.