Changeset 343 for cpp/frams/util/advlist.cpp
- Timestamp:
- 04/04/15 20:40:02 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/advlist.cpp
r286 r343 10 10 void AdvList::remove(int i) 11 11 { 12 l_del.action(i);13 SList::remove(i);14 l_postdel.action(i);12 l_del.action(i); 13 SList::remove(i); 14 l_postdel.action(i); 15 15 } 16 16 17 17 void AdvList::clear() 18 18 { 19 int i;20 for (i=size()-1;i>=0;i--) remove(i);21 resize(0);22 used=0;19 int i; 20 for (i = size() - 1; i >= 0; i--) remove(i); 21 resize(0); 22 used = 0; 23 23 } 24 24 25 25 void AdvList::operator-=(void* e) 26 26 { 27 int i=find(e);28 if (i>=0) remove(i);27 int i = find(e); 28 if (i >= 0) remove(i); 29 29 } 30 30 31 31 int AdvList::operator+=(void* e) 32 32 { 33 int p=size();34 SList::operator+=(e);35 l_add.action(p);36 return p;33 int p = size(); 34 SList::operator+=(e); 35 l_add.action(p); 36 return p; 37 37 } 38 38 39 39 void AdvList::mod(int x) 40 40 { 41 if (x<-1) x=-1;42 l_mod.action(x);41 if (x < -1) x = -1; 42 l_mod.action(x); 43 43 }
Note: See TracChangeset
for help on using the changeset viewer.