mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 18:03:37 +02:00
~agent(): Introduce proper destructor
This commit is contained in:
parent
1ed67c81b6
commit
07dbb9c4f9
2 changed files with 5 additions and 2 deletions
5
agent.h
5
agent.h
|
@ -20,6 +20,11 @@ public:
|
|||
|
||||
void on_tick(void);
|
||||
|
||||
~agent()
|
||||
{
|
||||
tile->on_agent_leave(*this);
|
||||
};
|
||||
|
||||
private:
|
||||
/* Just for initial placement. */
|
||||
void put_at(class tile &tile);
|
||||
|
|
2
main.cc
2
main.cc
|
@ -49,8 +49,6 @@ main(int argc, char *argv[])
|
|||
usleep(1000000);
|
||||
tick_id++;
|
||||
}
|
||||
|
||||
/* TODO: destroy agent cleanly */
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue