aboutsummaryrefslogtreecommitdiff
path: root/ViewController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ViewController.cpp')
-rw-r--r--ViewController.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/ViewController.cpp b/ViewController.cpp
index ea84bb8..cafccae 100644
--- a/ViewController.cpp
+++ b/ViewController.cpp
@@ -34,15 +34,14 @@ void ViewController::update_tiles(View & view) {
void ViewController::update_artists(View & view) {
People & people = this->museum.people;
- for (size_t i = 0; i < people.artists_size(); i++) {
- Artist & artist = people.get_artist(i);
+ for (Artist * artist : people.get_artists()) {
Rectangle rect = {
- .x = static_cast<unsigned int>(artist.data.x * scale),
- .y = static_cast<unsigned int>(artist.data.y * scale),
+ .x = static_cast<unsigned int>(artist->data.x * scale),
+ .y = static_cast<unsigned int>(artist->data.y * scale),
.width = artist_size,
.height = artist_size,
};
- view.draw_rect(rect, artist.color);
+ view.draw_rect(rect, artist->color);
}
}