source: cpp/frams/util/advlist.cpp @ 336

Last change on this file since 336 was 286, checked in by Maciej Komosinski, 10 years ago

Updated headers

  • Property svn:eol-style set to native
File size: 669 bytes
Line 
1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
4
5#include <stdlib.h>
6#include <string.h>
7#include <stdio.h>
8#include "advlist.h"
9
10void AdvList::remove(int i)
11{
12l_del.action(i);
13SList::remove(i);
14l_postdel.action(i);
15}
16
17void AdvList::clear()
18{
19int i;
20for (i=size()-1;i>=0;i--) remove(i);
21resize(0);
22used=0;
23}
24
25void AdvList::operator-=(void* e)
26{
27int i=find(e);
28if (i>=0) remove(i);
29}
30
31int AdvList::operator+=(void* e)
32{
33int p=size();
34SList::operator+=(e);
35l_add.action(p);
36return p;
37}
38
39void AdvList::mod(int x)
40{
41if (x<-1) x=-1;
42l_mod.action(x);
43}
Note: See TracBrowser for help on using the repository browser.