diff options
Diffstat (limited to 'People.cpp')
-rw-r--r-- | People.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -4,6 +4,8 @@ using namespace std; +People::People(Museum & museum) : museum(museum) {} + People::~People() { for (Artist * artist : this->artists) { if (artist == nullptr) continue; @@ -13,7 +15,7 @@ People::~People() { } void People::add_artist(ArtistData data) { - this->artists.push_back(new Artist(data)); + this->artists.push_back(new Artist(this->museum, data)); } size_t People::artists_size() { @@ -38,10 +40,10 @@ string People::to_string() { return out; } -void People::update(Museum & museum) { +void People::update() { for (Artist * artist : this->artists) { if (artist == nullptr) continue; - artist->update(museum); + artist->update(); } } |