aboutsummaryrefslogtreecommitdiff
path: root/People.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'People.cpp')
-rw-r--r--People.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/People.cpp b/People.cpp
index 5bc11f7..32a9227 100644
--- a/People.cpp
+++ b/People.cpp
@@ -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();
}
}