diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-13 21:51:08 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-13 21:51:08 +0200 |
commit | 212734b31102b11f4819c6676270baa1c99ea27b (patch) | |
tree | 34824491dc1be973ead0005a6b849daa9ecbb296 /Canvas.cpp | |
parent | c4f08b23bfc6832e3158e2f15fd6bfd15c04eab6 (diff) |
use std::list instead of std::vector for storing artists + identify some instability causes
Diffstat (limited to 'Canvas.cpp')
-rw-r--r-- | Canvas.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -75,12 +75,11 @@ string Canvas::to_string(bool truecolor) { } void Canvas::update_steps() { - for (size_t i = 0; i < this->museum.people.artists_size(); i++) { - Artist & artist = this->museum.people.get_artist(i); - if (artist.step == false) continue; - artist.step = false; + for (Artist * artist : this->museum.people.get_artists()) { + if (artist->step == false) continue; + artist->step = false; - this->get_tile(artist.data.x, artist.data.y).step(artist); + this->get_tile(artist->data.x, artist->data.y).step(*artist); } } |